]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Clear the UDP states of TCP-only backends 10844/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 13 Oct 2021 16:06:28 +0000 (18:06 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 13 Oct 2021 16:06:28 +0000 (18:06 +0200)
pdns/dnsdist-lua.cc

index 6ef859f0fc214c73dba82d51cc47c58a080e4b3d..08f179a64a6705a9e59d31e4f1bee2b0c56afcf6 100644 (file)
@@ -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();