Print error message if we're not configured to listen on any ports
authorAlan T. DeKok <aland@freeradius.org>
Thu, 9 Sep 2010 11:15:04 +0000 (13:15 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 9 Sep 2010 11:15:04 +0000 (13:15 +0200)
Manual merge of a50005713e5238

src/main/listen.c

index 67eed25..6effff6 100644 (file)
@@ -2667,6 +2667,15 @@ int listen_init(CONF_SECTION *config, rad_listen_t **head)
 
 add_sockets:
        /*
+        *      No sockets to receive packets, this is an error.
+        *      proxying is pointless.
+        */
+       if (!*head) {
+               radlog(L_ERR, "The server is not configured to listen on any ports.  Cannot start.");
+               return -1;
+       }
+
+       /*
         *      Print out which sockets we're listening on, and
         *      add them to the event list.
         */