diff --git a/src/main/client.c b/src/main/client.c index a9044a33a5d0..110b45473e6f 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -231,6 +231,7 @@ bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client) if (!clients) { if (client->server != NULL) { CONF_SECTION *cs; + CONF_SECTION *listen; cs = cf_section_sub_find_name2(main_config.config, "server", client->server); if (!cs) { @@ -238,6 +239,13 @@ bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client) return false; } + /* + * If this server has no "listen" section, add the clients + * to the global client list. + */ + listen = cf_section_sub_find(cs, "listen"); + if (!listen) goto global_clients; + /* * If the client list already exists, use that. * Otherwise, create a new client list. @@ -258,6 +266,7 @@ bool client_add(RADCLIENT_LIST *clients, RADCLIENT *client) } } else { + global_clients: /* * Initialize the global list, if not done already. */