From: Alan T. DeKok Date: Wed, 7 Sep 2011 10:59:21 +0000 (+0200) Subject: Document keepalive X-Git-Tag: release_3_0_0_beta0~648 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b561ba28e0cd5085d236f9a3e2e918ec7d2e3d2;p=thirdparty%2Ffreeradius-server.git Document keepalive --- diff --git a/raddb/modules/ldap b/raddb/modules/ldap index 7c28632eafd..c9520f47293 100644 --- a/raddb/modules/ldap +++ b/raddb/modules/ldap @@ -177,4 +177,21 @@ ldap { # "password_header" configuration items have been removed. # Since they were deprecated long ago, this change should not # affect anyone. + + # + # 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 + } } diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index c53293d4b3b..a27a745ed4e 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -190,6 +190,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"}, @@ -203,6 +204,7 @@ static CONF_PARSER keepalive_config[] = { { NULL, -1, 0, NULL, NULL } }; +#endf /* KEEPALIVE */ static CONF_PARSER tls_config[] = { {"start_tls", PW_TYPE_BOOLEAN, @@ -338,7 +340,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} };