From aab6af1c4e1f1f8ecd4b0195d5bd290372ac1121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Thu, 2 Aug 2018 10:00:24 +0100 Subject: [PATCH] Switch to LDAP_OTHER when handling a lost upstream. LDAP_UNAVAILABLE signals "the server is shutting down or a subsystem necessary to complete the operation is offline", so intelligent clients tend to infer the connection will not be usable any more, which is not the case here. --- servers/lloadd/bind.c | 4 ++-- servers/lloadd/operation.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/servers/lloadd/bind.c b/servers/lloadd/bind.c index 2354a9a70d..3f0993a63e 100644 --- a/servers/lloadd/bind.c +++ b/servers/lloadd/bind.c @@ -352,7 +352,7 @@ request_bind( LloadConnection *client, LloadOperation *op ) Debug( LDAP_DEBUG_STATS, "request_bind: " "connid=%lu, msgid=%d pinned upstream lost\n", op->o_client_connid, op->o_client_msgid ); - operation_send_reject( op, LDAP_UNAVAILABLE, + operation_send_reject( op, LDAP_OTHER, "connection to the remote server has been severed", 1 ); pin = 0; goto done; @@ -638,7 +638,7 @@ handle_bind_response( !BER_BVISNULL( &upstream->c_sasl_bind_mech ) ) { CONNECTION_UNLOCK(upstream); operation_send_reject( - op, LDAP_UNAVAILABLE, "upstream connection is closing", 0 ); + op, LDAP_OTHER, "upstream connection is closing", 0 ); ber_free( ber, 1 ); return LDAP_SUCCESS; diff --git a/servers/lloadd/operation.c b/servers/lloadd/operation.c index 95ae15e3d9..f8f559cb40 100644 --- a/servers/lloadd/operation.c +++ b/servers/lloadd/operation.c @@ -805,7 +805,7 @@ operation_lost_upstream( LloadOperation *op ) { LloadConnection *c = op->o_upstream; - operation_send_reject( op, LDAP_UNAVAILABLE, + operation_send_reject( op, LDAP_OTHER, "connection to the remote server has been severed", 0 ); CONNECTION_LOCK(c);