From: Pieter Lexis Date: Wed, 3 Apr 2019 14:09:21 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into rec-throttle-fwd-recurse X-Git-Tag: rec-4.2.0-beta1~7^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9bf436b07f3a79c9b57422fb3865b585dab77c8;p=thirdparty%2Fpdns.git Merge remote-tracking branch 'origin/master' into rec-throttle-fwd-recurse --- e9bf436b07f3a79c9b57422fb3865b585dab77c8 diff --cc pdns/pdns_recursor.cc index 749c6750a4,ae37f9da8d..79e2cfba5b --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@@ -3719,23 -3776,12 +3780,29 @@@ static int serviceMain(int argc, char*a g_statisticsInterval = ::arg().asNum("statistics-interval"); + { + SuffixMatchNode dontThrottleNames; + vector parts; + stringtok(parts, ::arg()["dont-throttle-names"]); + for (const auto &p : parts) { + dontThrottleNames.add(DNSName(p)); + } + g_dontThrottleNames.setState(dontThrottleNames); + + NetmaskGroup dontThrottleNetmasks; + stringtok(parts, ::arg()["dont-throttle-netmasks"]); + for (const auto &p : parts) { + dontThrottleNetmasks.addMask(Netmask(p)); + } + g_dontThrottleNetmasks.setState(dontThrottleNetmasks); + } + + s_balancingFactor = ::arg().asDouble("distribution-load-factor"); + if (s_balancingFactor != 0.0 && s_balancingFactor < 1.0) { + s_balancingFactor = 0.0; + g_log<