{
fr_command_socket_t *sock;
+ if (check_config) return 0;
+
sock = this->data;
if (cf_section_parse(cs, sock, command_config) < 0) {
{ NULL, -1, 0, NULL, NULL } /* end the list */
};
+extern int check_config;
/*
* Parse a detail section.
RADCLIENT *client;
char buffer[2048];
+ if (check_config) return 0;
+
if (!this->data) {
this->data = rad_malloc(sizeof(*data));
memset(this->data, 0, sizeof(*data));
rcode = common_socket_parse(cs, this);
if (rcode != 0) return rcode;
+ if (check_config) return 0;
+
sock = this->data;
/*
if (check_config) {
DEBUG("%s: #### Skipping IP addresses and Ports ####",
mainconfig.name);
+ if (listen_init(cs, &head) < 0) {
+ fflush(NULL);
+ exit(1);
+ }
return 1;
}
return 1;
}
+extern int check_config; /* radiusd.c */
+
/*
* Parse an authentication or accounting socket.
sock->my_ipaddr = ipaddr;
sock->my_port = listen_port;
+ if (check_config) {
+ if (home_server_find(&sock->ipaddr, sock->port)) {
+ 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);
+ return -1;
+ }
+
+ return 0; /* don't do anything */
+ }
+
/*
* If we can bind to interfaces, do so,
* else don't.