]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
if there's no "server foo", then use "server default"
authorAlan T. DeKok <aland@freeradius.org>
Wed, 16 Aug 2023 13:01:36 +0000 (09:01 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 16 Aug 2023 13:01:36 +0000 (09:01 -0400)
src/main/listen.c

index d1a5e61251bc4ce415ec0f698334c5f3d6a05d5e..99004723b857c3a08c4255586b80da0c274873e4 100644 (file)
@@ -3994,7 +3994,9 @@ int listen_init(CONF_SECTION *config, rad_listen_t **head, bool spawn_flag)
                if (override) {
                        cs = cf_section_sub_find_name2(config, "server",
                                                       main_config.name);
-                       if (cs) this->server = main_config.name;
+                       if (!cs) cs = cf_section_sub_find_name2(config, "server",
+                                                      "default");
+                       if (cs) this->server = cf_section_name2(cs);
                }
 
                *last = this;