From f452946783886e560874d6f0953b8dc6d13a4ea4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 17 Oct 2016 10:07:23 -0700 Subject: [PATCH] s3: cldap: cldap_multi_netlogon_send() fails with one bad IPv6 address. Analysis by: Rebecca Gellman Ignore cldap_socket_init() failure when sending multiple cldap netlogon requests. Allow cldap_netlogon_send() to catch the bad address and correctly return through a tevent subreq. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12381 Signed-off-by: Jeremy Allison --- source3/libads/cldap.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/source3/libads/cldap.c b/source3/libads/cldap.c index bd77943..586a04a 100644 --- a/source3/libads/cldap.c +++ b/source3/libads/cldap.c @@ -117,8 +117,21 @@ struct tevent_req *cldap_multi_netlogon_send( NULL, /* local_addr */ state->servers[i], &state->cldap[i]); - if (tevent_req_nterror(req, status)) { - return tevent_req_post(req, ev); + if (!NT_STATUS_IS_OK(status)) { + /* + * Don't error out all sends just + * because one cldap_socket_init() failed. + * Log it here, and the cldap_netlogon_send() + * will catch it (with in.dest_address == NULL) + * and correctly error out in + * cldap_multi_netlogon_done(). This still allows + * the other requests to be concurrently sent. + */ + DBG_NOTICE("cldap_socket_init failed for %s " + " error %s\n", + tsocket_address_string(state->servers[i], + req), + nt_errstr(status)); } state->ios[i].in.dest_address = NULL; -- 2.8.0.rc3.226.g39d4020