From 5d5f431868f3ca693c1e8ed6fafc6f7d5eeb6b25 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Thu, 4 Mar 2021 00:55:24 +0000 Subject: [PATCH] ITS#9490 - Add keepalive settings to ldap.conf --- doc/man/man5/ldap.conf.5 | 12 ++++++++++++ libraries/libldap/init.c | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/doc/man/man5/ldap.conf.5 b/doc/man/man5/ldap.conf.5 index 4c4321e3e8..e731414c1b 100644 --- a/doc/man/man5/ldap.conf.5 +++ b/doc/man/man5/ldap.conf.5 @@ -171,6 +171,18 @@ list of hosts may be provided. is deprecated in favor of .BR URI . .TP +.B _KEEPALIVE_IDLE +Sets/gets the number of seconds a connection needs to remain idle +before TCP starts sending keepalive probes. Linux only. +.TP +.B KEEPALIVE_PROBES +Sets/gets the maximum number of keepalive probes TCP should send +before dropping the connection. Linux only. +.TP +.B KEEPALIVE_INTERVAL +Sets/gets the interval in seconds between individual keepalive probes. +Linux only. +.TP .B NETWORK_TIMEOUT Specifies the timeout (in seconds) after which the poll(2)/select(2) following a connect(2) returns in case of no activity. diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index 6a752361d3..f2e3e50384 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -94,6 +94,10 @@ static const struct ol_attribute { {0, ATTR_OPTION, "HOST", NULL, LDAP_OPT_HOST_NAME}, /* deprecated */ {0, ATTR_OPTION, "URI", NULL, LDAP_OPT_URI}, /* replaces HOST/PORT */ {0, ATTR_BOOL, "REFERRALS", NULL, LDAP_BOOL_REFERRALS}, + {0, ATTR_INT, "KEEPALIVE_IDLE", NULL, LDAP_OPT_X_KEEPALIVE_IDLE}, + {0, ATTR_INT, "KEEPALIVE_PROBES", NULL, LDAP_OPT_X_KEEPALIVE_PROBES}, + {0, ATTR_INT, "KEEPALIVE_INTERVAL", NULL, LDAP_OPT_X_KEEPALIVE_INTERVAL}, + #if 0 /* This should only be allowed via ldap_set_option(3) */ {0, ATTR_BOOL, "RESTART", NULL, LDAP_BOOL_RESTART}, -- 2.47.3