Rename "server_pool" to "home_server_pool". It's clearer
authoraland <aland>
Tue, 9 Oct 2007 14:15:34 +0000 (14:15 +0000)
committeraland <aland>
Tue, 9 Oct 2007 14:15:34 +0000 (14:15 +0000)
raddb/proxy.conf
src/main/realms.c

index c5b2e88..05b2d1d 100644 (file)
@@ -80,7 +80,7 @@ proxy server {
 #
 #
 #  Load-balancing and failover between home servers is handled via
-#  a "server_pool" section.
+#  a "home_server_pool" section.
 #
 #  Finally, The "realm" section defines the realm, some options, and
 #  indicates which server pool should be used for the realm.
@@ -317,10 +317,10 @@ home_server localhost {
 #  the same 10 realms, you would need 50 "realm" entries.
 #
 #  In version 2.0, you would need 5 "home_server" sections,
-#  10 'realm" sections, and one "server_pool" section to tie the
+#  10 'realm" sections, and one "home_server_pool" section to tie the
 #  two together.
 #
-server_pool my_auth_failover {
+home_server_pool my_auth_failover {
        #
        #  The type of this pool controls how home servers are chosen.
        #
@@ -426,16 +426,16 @@ realm example.com {
        #  Realms point to pools of home servers.
 #
        #  For authentication, the "auth_pool" configuration item
-       #  should point to a "server_pool" that was previously
+       #  should point to a "home_server_pool" that was previously
        #  defined.  All of the home servers in the "auth_pool" must
        #  be of type "auth".
        #
        #  For accounting, the "acct_pool" configuration item
-       #  should point to a "server_pool" that was previously
+       #  should point to a "home_server_pool" that was previously
        #  defined.  All of the home servers in the "acct_pool" must
        #  be of type "acct".
        #
-       #  If you have a "server_pool" where all of the home servers
+       #  If you have a "home_server_pool" where all of the home servers
        #  are of type "auth+acct", you can just use the "pool"
        #  configuration item, instead of specifying both "auth_pool"
        #  and "acct_pool".
index 1fc6c8f..217a328 100644 (file)
@@ -545,9 +545,10 @@ static int server_pool_add(realm_config_t *rc,
        int num_home_servers;
 
        name2 = cf_section_name1(cs);
-       if (!name2 || (strcasecmp(name2, "server_pool") != 0)) {
+       if (!name2 || ((strcasecmp(name2, "server_pool") != 0) &&
+                      (strcasecmp(name2, "home_server_pool") != 0))) {
                cf_log_err(cf_sectiontoitem(cs),
-                          "Section is not a server_pool.");
+                          "Section is not a home_server_pool.");
                return 0;
        }
 
@@ -615,7 +616,7 @@ static int server_pool_add(realm_config_t *rc,
                                 num_home_servers);
        pool->cs = cs;
 
-       if (do_print) DEBUG2(" server_pool %s {", name2);
+       if (do_print) DEBUG2(" home_server_pool %s {", name2);
 
        cp = cf_pair_find(cs, "type");
        if (cp) {
@@ -1041,10 +1042,15 @@ static int add_pool_to_realm(realm_config_t *rc, CONF_SECTION *cs,
                CONF_SECTION *pool_cs;
 
                pool_cs = cf_section_sub_find_name2(rc->cs,
-                                                   "server_pool",
+                                                   "home_server_pool",
                                                    name);
                if (!pool_cs) {
-                       cf_log_err(cf_sectiontoitem(cs), "Failed to find server_pool \"%s\"", name);
+                       pool_cs = cf_section_sub_find_name2(rc->cs,
+                                                           "server_pool",
+                                                           name);
+               }
+               if (!pool_cs) {
+                       cf_log_err(cf_sectiontoitem(cs), "Failed to find home_server_pool \"%s\"", name);
                        return 0;
                }
 
@@ -1060,7 +1066,7 @@ static int add_pool_to_realm(realm_config_t *rc, CONF_SECTION *cs,
        }
 
        if (pool->server_type != server_type) {
-               cf_log_err(cf_sectiontoitem(cs), "Incompatible server_pool \"%s\" (mixed auth_pool / acct_pool)", name);
+               cf_log_err(cf_sectiontoitem(cs), "Incompatible home_server_pool \"%s\" (mixed auth_pool / acct_pool)", name);
                return 0;
        }