From: Remi Gacogne Date: Mon, 15 May 2023 13:32:27 +0000 (+0200) Subject: dnsdist: Really disable REUSEADDR on outgoing UDP client sockets X-Git-Tag: dnsdist-1.8.1~22^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d013627bc15a919f80ff193593813c8a7587a57;p=thirdparty%2Fpdns.git dnsdist: Really disable REUSEADDR on outgoing UDP client sockets It turns out that our `Socket::bind()` will _helpfully_ enable this by default. (cherry picked from commit 20f67fee9447069d4586a41254468ac060b2d65e) --- diff --git a/pdns/dnsdistdist/dnsdist-healthchecks.cc b/pdns/dnsdistdist/dnsdist-healthchecks.cc index fc831e6481..ab147cb150 100644 --- a/pdns/dnsdistdist/dnsdist-healthchecks.cc +++ b/pdns/dnsdistdist/dnsdist-healthchecks.cc @@ -327,7 +327,7 @@ bool queueHealthCheck(std::unique_ptr& mplexer, const std::shared SSetsockopt(sock.getHandle(), SOL_IP, IP_BIND_ADDRESS_NO_PORT, 1); } #endif - sock.bind(ds->d_config.sourceAddr); + sock.bind(ds->d_config.sourceAddr, false); } auto data = std::make_shared(*mplexer, ds, std::move(checkName), checkType, checkClass, queryID);