From 562c8eb7d329ed43e52b33a02d395acd32eb7525 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Thu, 9 Sep 2010 13:15:04 +0200 Subject: [PATCH] Print error message if we're not configured to listen on any ports Manual merge of a50005713e5238 --- src/main/listen.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/listen.c b/src/main/listen.c index 67eed25..6effff6 100644 --- a/src/main/listen.c +++ b/src/main/listen.c @@ -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. */ -- 2.1.4