From: Nick Porter Date: Fri, 8 Dec 2023 14:02:40 +0000 (+0000) Subject: If we've got a cookie, send it back X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e7d18f92ce0772188f6115b5053b0d4de274d22;p=thirdparty%2Ffreeradius-server.git If we've got a cookie, send it back Relying on the rcode does not match any other encoders. If we need to make the cookie return optional, it should be based on request->reply->code --- diff --git a/src/listen/ldap_sync/proto_ldap_sync.c b/src/listen/ldap_sync/proto_ldap_sync.c index 6917ebbacf0..c814e043d34 100644 --- a/src/listen/ldap_sync/proto_ldap_sync.c +++ b/src/listen/ldap_sync/proto_ldap_sync.c @@ -216,11 +216,6 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8 */ if (request->reply->code != FR_LDAP_SYNC_CODE_COOKIE_LOAD_RESPONSE) goto send; - /* - * We only return the cookie if the section exited "ok" or "updated" - */ - if ((request->rcode != RLM_MODULE_OK) && (request->rcode != RLM_MODULE_UPDATED)) goto send; - vp = fr_pair_find_by_da_nested(&request->reply_pairs, NULL, attr_ldap_sync_cookie); if ((vp) && (vp->data.vb_length > 0)) { fr_pair_remove(&request->reply_pairs, vp);