Document keepalive
authorAlan T. DeKok <aland@freeradius.org>
Wed, 7 Sep 2011 10:59:21 +0000 (12:59 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 7 Sep 2011 10:59:21 +0000 (12:59 +0200)
raddb/modules/ldap
src/modules/rlm_ldap/rlm_ldap.c

index 8a2077a..5351a81 100644 (file)
@@ -166,4 +166,21 @@ ldap {
        #       default: 0x0000 (no debugging messages)
        #       Example:(LDAP_DEBUG_FILTER+LDAP_DEBUG_CONNS)
        #ldap_debug = 0x0028 
+
+       #
+       #  Keepalive configuration.  This MAY NOT be supported by your
+       #  LDAP library.  If these configuration entries appear in the
+       #  output of "radiusd -X", then they are supported.  Otherwise,
+       #  they are unsupported, and changing them will do nothing.
+       #
+       keepalive {
+               # LDAP_OPT_X_KEEPALIVE_IDLE
+               idle = 60
+
+               # LDAP_OPT_X_KEEPALIVE_PROBES
+               probes = 3
+
+               # LDAP_OPT_X_KEEPALIVE_INTERVAL
+               interval = 3
+       }
 }
index 058e769..fbb1624 100644 (file)
@@ -192,6 +192,7 @@ typedef struct {
 /* The default setting for TLS Certificate Verification */
 #define TLS_DEFAULT_VERIFY "allow"
 
+#if defined(LDAP_OPT_X_KEEPALIVE_IDLE) || defined(LDAP_OPT_X_KEEPALIVE_PROBES) || defined (LDAP_OPT_ERROR_NUMBER)
 static CONF_PARSER keepalive_config[] = {
 #ifdef LDAP_OPT_X_KEEPALIVE_IDLE
        {"idle", PW_TYPE_INTEGER, offsetof(ldap_instance,keepalive_idle), NULL, "60"},
@@ -205,6 +206,7 @@ static CONF_PARSER keepalive_config[] = {
 
        { NULL, -1, 0, NULL, NULL }
 };
+#endf                          /* KEEPALIVE */
 
 static CONF_PARSER tls_config[] = {
        {"start_tls", PW_TYPE_BOOLEAN,
@@ -344,7 +346,10 @@ static const CONF_PARSER module_config[] = {
 
        {"set_auth_type", PW_TYPE_BOOLEAN, offsetof(ldap_instance,set_auth_type), NULL, "yes"},
 
+#if defined(LDAP_OPT_X_KEEPALIVE_IDLE) || defined(LDAP_OPT_X_KEEPALIVE_PROBES) || defined (LDAP_OPT_ERROR_NUMBER)
        { "keepalive", PW_TYPE_SUBSECTION, 0, NULL, (const void *) keepalive_config },
+#endif
+
        {NULL, -1, 0, NULL, NULL}
 };