Fix and document check_timeout which helps with check_interval
authorAlan T. DeKok <aland@freeradius.org>
Fri, 13 Jun 2014 13:37:22 +0000 (09:37 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 13 Jun 2014 13:41:32 +0000 (09:41 -0400)
raddb/proxy.conf
src/main/realms.c

index 4d0f1ff..6e61fad 100644 (file)
@@ -386,6 +386,12 @@ home_server localhost {
        check_interval = 30
 
        #
+       #  Wait "check_timeout" seconds for a reply to a status check
+       #  packet.
+       #
+       check_timeout = 4
+
+       #
        #  Configure the number of status checks in a row that the
        #  home server needs to respond to before it is marked alive.
        #
index 0c56fe6..a1637a5 100644 (file)
@@ -320,9 +320,12 @@ static CONF_PARSER home_server_config[] = {
 
        { "ping_interval", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, ping_interval), "30" },
        { "check_interval", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, ping_interval), "30" },
+
+       { "check_timeout", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, ping_timeout), "4" },
+       { "status_check_timeout", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, ping_timeout), NULL },
+
        { "num_answers_to_alive", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, num_pings_to_alive), "3" },
        { "revive_interval", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, revive_interval), "300" },
-       { "status_check_timeout", FR_CONF_OFFSET(PW_TYPE_INTEGER, home_server_t, ping_timeout), "4" },
 
        { "username", FR_CONF_OFFSET(PW_TYPE_STRING, home_server_t, ping_user_name), NULL },
        { "password", FR_CONF_OFFSET(PW_TYPE_STRING, home_server_t, ping_user_password), NULL },
@@ -684,8 +687,8 @@ static int home_server_add(realm_config_t *rc, CONF_SECTION *cs)
        FR_INTEGER_BOUND_CHECK("num_pings_to_alive", home->num_pings_to_alive, >=, 3);
        FR_INTEGER_BOUND_CHECK("num_pings_to_alive", home->num_pings_to_alive, <=, 10);
 
-       FR_INTEGER_BOUND_CHECK("ping_timeout", home->ping_timeout, >=, 3);
-       FR_INTEGER_BOUND_CHECK("ping_timeout", home->ping_timeout, <=, 10);
+       FR_INTEGER_BOUND_CHECK("check_timeout", home->ping_timeout, >=, 1);
+       FR_INTEGER_BOUND_CHECK("check_timeout", home->ping_timeout, <=, 10);
 
        FR_INTEGER_BOUND_CHECK("revive_interval", home->revive_interval, >=, 60);
        FR_INTEGER_BOUND_CHECK("revive_interval", home->revive_interval, <=, 3600);