]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec-main: let NetmaskGroup parse dont-throttle-netmasks 13991/head
authorDoug Freed <dwfreed@mtu.edu>
Thu, 21 Mar 2024 09:42:15 +0000 (04:42 -0500)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 27 Mar 2024 11:36:33 +0000 (12:36 +0100)
This allows dont-throttle-netmasks to have negations.

(cherry picked from commit 109aebd08611cbb148cd520c7466968873e986f7)

pdns/recursordist/rec-main.cc

index 69b2a56128f3a8add3c1b1abdc8e8aa365643d0b..adcf9556efe509e448298579e7c8762951e1ccba 100644 (file)
@@ -1946,12 +1946,8 @@ static void initSuffixMatchNodes([[maybe_unused]] Logr::log_t log)
     }
     g_dontThrottleNames.setState(std::move(dontThrottleNames));
 
-    parts.clear();
     NetmaskGroup dontThrottleNetmasks;
-    stringtok(parts, ::arg()["dont-throttle-netmasks"], " ,");
-    for (const auto& part : parts) {
-      dontThrottleNetmasks.addMask(Netmask(part));
-    }
+    dontThrottleNetmasks.toMasks(::arg()["dont-throttle-netmasks"]);
     g_dontThrottleNetmasks.setState(std::move(dontThrottleNetmasks));
   }