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: rec-4.9.0-beta1~8^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12819%2Fhead;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. --- diff --git a/pdns/dnsdistdist/dnsdist-healthchecks.cc b/pdns/dnsdistdist/dnsdist-healthchecks.cc index 9ec50e3a5a..213374020f 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);