From: Remi Gacogne Date: Mon, 18 Mar 2024 15:16:17 +0000 (+0100) Subject: dnsdist: Properly account the failure to forward a query to a backend X-Git-Tag: rec-5.1.0-alpha1~114^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0b3480b98d41db821f681183f45d5d08db02f93;p=thirdparty%2Fpdns.git dnsdist: Properly account the failure to forward a query to a backend --- diff --git a/pdns/dnsdistdist/dnsdist.cc b/pdns/dnsdistdist/dnsdist.cc index f836e13200..06dc478118 100644 --- a/pdns/dnsdistdist/dnsdist.cc +++ b/pdns/dnsdistdist/dnsdist.cc @@ -1260,8 +1260,11 @@ ssize_t udpClientSendRequestToBackend(const std::shared_ptr& ba We don't want to reconnect the real socket if the healthcheck failed, because it's not using the same socket. */ - if (!healthCheck && (savederrno == EINVAL || savederrno == ENODEV || savederrno == ENETUNREACH || savederrno == EBADF)) { - backend->reconnect(); + if (!healthCheck) { + if (savederrno == EINVAL || savederrno == ENODEV || savederrno == ENETUNREACH || savederrno == EBADF) { + backend->reconnect(); + } + backend->reportTimeoutOrError(); } }