From 80577b0965bcff8e476eff512f671b2076bb49d9 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 13 Oct 2021 18:06:28 +0200 Subject: [PATCH] dnsdist: Clear the UDP states of TCP-only backends --- pdns/dnsdist-lua.cc | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- 2.47.2