From: Nick Porter Date: Thu, 17 Nov 2022 19:46:52 +0000 (+0000) Subject: Ensure that cookie storage which fails to send is left on the queue X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2515860f03b59a21dcff580669da37dcb2ea2ce8;p=thirdparty%2Ffreeradius-server.git Ensure that cookie storage which fails to send is left on the queue --- diff --git a/src/listen/ldap_sync/proto_ldap_sync_ldap.c b/src/listen/ldap_sync/proto_ldap_sync_ldap.c index 17b75cb9285..7a4e8d6fccd 100644 --- a/src/listen/ldap_sync/proto_ldap_sync_ldap.c +++ b/src/listen/ldap_sync/proto_ldap_sync_ldap.c @@ -299,8 +299,12 @@ int ldap_sync_cookie_send(sync_packet_ctx_t *sync_packet_ctx) if (fr_internal_encode_list(dbuff, &pairs, NULL) < 0) goto error; talloc_free(local); - fr_network_listen_send_packet(thread->nr, thread->li, thread->li, fr_dbuff_buff(dbuff), - fr_dbuff_used(dbuff), fr_time(), sync_packet_ctx); + if (fr_network_listen_send_packet(thread->nr, thread->li, thread->li, fr_dbuff_buff(dbuff), + fr_dbuff_used(dbuff), fr_time(), sync_packet_ctx) < 0) { + sync_packet_ctx->status = SYNC_PACKET_PENDING; + return -1; + } + sync_packet_ctx->status = SYNC_PACKET_PROCESSING; return 0;