sock->my_port = listen_port;
if (check_config) {
- if (home_server_find(&sock->ipaddr, sock->port)) {
+ if (home_server_find(&sock->my_ipaddr, sock->my_port, sock->proto)) {
char buffer[128];
DEBUG("ERROR: We have been asked to listen on %s port %d, which is also listed as a home server. This can create a proxy loop.",
- ip_ntoh(&sock->ipaddr, buffer, sizeof(buffer)),
- sock->port);
+ ip_ntoh(&sock->my_ipaddr, buffer, sizeof(buffer)),
+ sock->my_port);
return -1;
}
#endif
default:
- radlog(L_ERR, "ERROR: Non-fatal internal sanity check failed in bind.");
+ DEBUG("WARNING: Internal sanity check failed in binding to socket. Ignoring problem.");
return -1;
}
}
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.
*/