From: Remi Gacogne Date: Wed, 13 Oct 2021 16:06:28 +0000 (+0200) Subject: dnsdist: Clear the UDP states of TCP-only backends X-Git-Tag: dnsdist-1.7.0-alpha2~11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10844%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Clear the UDP states of TCP-only backends --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 6ef859f0fc..08f179a64a 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -565,6 +565,11 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) } } + if (ret->isTCPOnly()) { + /* no need to keep the UDP states, then */ + ret->idStates.clear(); + } + /* this needs to be done _AFTER_ the order has been set, since the server are kept ordered inside the pool */ auto localPools = g_pools.getCopy();