From: Remi Gacogne Date: Thu, 2 Mar 2023 14:04:57 +0000 (+0100) Subject: dnsdist: Fix parameter validation with XSK X-Git-Tag: dnsdist-1.9.0-rc1^2~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb8ab11ec3dc4bbd31aaaf5d8f696a6591c16ed5;p=thirdparty%2Fpdns.git dnsdist: Fix parameter validation with XSK --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index ac6e6e84e8..3338ceea31 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -752,8 +752,6 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) parseLocalBindVars(vars, reusePort, tcpFastOpenQueueSize, interface, cpus, tcpListenQueueSize, maxInFlightQueriesPerConn, tcpMaxConcurrentConnections, enableProxyProtocol); - checkAllParametersConsumed("setLocal", vars); - try { ComboAddress loc(addr, 53); for (auto it = g_frontends.begin(); it != g_frontends.end();) { @@ -792,6 +790,8 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) #endif /* HAVE_XSK */ g_frontends.push_back(std::move(udpCS)); g_frontends.push_back(std::move(tcpCS)); + + checkAllParametersConsumed("setLocal", vars); } catch (const std::exception& e) { g_outputBuffer = "Error: " + string(e.what()) + "\n"; @@ -816,7 +816,6 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) bool enableProxyProtocol = true; parseLocalBindVars(vars, reusePort, tcpFastOpenQueueSize, interface, cpus, tcpListenQueueSize, maxInFlightQueriesPerConn, tcpMaxConcurrentConnections, enableProxyProtocol); - checkAllParametersConsumed("addLocal", vars); try { ComboAddress loc(addr, 53); @@ -845,6 +844,8 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) #endif /* HAVE_XSK */ g_frontends.push_back(std::move(udpCS)); g_frontends.push_back(std::move(tcpCS)); + + checkAllParametersConsumed("addLocal", vars); } catch (std::exception& e) { g_outputBuffer = "Error: " + string(e.what()) + "\n";