]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec-main: let NetmaskGroup parse dont-throttle-netmasks 13966/head
authorDoug Freed <dwfreed@mtu.edu>
Thu, 21 Mar 2024 09:42:15 +0000 (04:42 -0500)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 09:42:15 +0000 (04:42 -0500)
This allows dont-throttle-netmasks to have negations.

pdns/recursordist/rec-main.cc

index e652ddb0cc7ff970cffd51adf6712ec711fe39cf..700df61cd8397552dda3ffaed5b527927b42ec5f 100644 (file)
@@ -1948,12 +1948,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));
   }