Hello,

this patch allows BIND to start if LDAP connection times out. BIND will reconnect in same way as after "connection refused" errors.


The patch closes https://fedorahosted.org/bind-dyndb-ldap/ticket/84 .

--
Petr^2 Spacek
From eaa35060fc47c1422ca7b577fe0096aadd2f8c0a Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Tue, 28 Aug 2012 13:54:51 +0200
Subject: [PATCH] Allow BIND to start if LDAP connection times out.

https://fedorahosted.org/bind-dyndb-ldap/ticket/84

Signed-off-by: Petr Spacek <pspa...@redhat.com>
---
 src/ldap_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index da083d2e65032e650cfbbeb863262e0141403407..d533d1985c9fb8f56f333a99208d3f60f0b4c5bf 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -2797,7 +2797,7 @@ ldap_pool_connect(ldap_pool_t *pool, ldap_instance_t *ldap_inst)
 		ldap_conn = NULL;
 		CHECK(new_ldap_connection(pool, &ldap_conn));
 		result = ldap_connect(ldap_inst, ldap_conn, ISC_FALSE);
-		if (result == ISC_R_NOTCONNECTED) {
+		if (result == ISC_R_NOTCONNECTED || result == ISC_R_TIMEDOUT) {
 			/* LDAP server is down which can happen, continue */
 			result = ISC_R_SUCCESS;
 		} else if (result != ISC_R_SUCCESS) {
-- 
1.7.11.2

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to