]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reorder rules in dnsdist recursive/authoritative example 16149/head
authorMaxHearnden <MaxHearnden@users.noreply.github.com>
Mon, 22 Sep 2025 14:59:23 +0000 (15:59 +0100)
committerGitHub <noreply@github.com>
Mon, 22 Sep 2025 14:59:23 +0000 (15:59 +0100)
RDRule is likely to be cheaper to evaluate than a NetmaskGroupRule and so evaluating RDRule first will allow NetmaskGroupRule to sometimes be shortcutted.

Co-authored-by: Remi Gacogne <github@coredump.fr>
Signed-off-by: MaxHearnden <MaxHearnden@users.noreply.github.com>
docs/guides/recursion.rst

index a9b9d10f79849f9bd60eff65d3e60513d25ee862..6e97cc731ff01fb3b958e4bd68b21c8ef31c20dc 100644 (file)
@@ -207,7 +207,7 @@ This is where several settings from the existing Authoritative Server
     recursive_ips:addMask('NETWORKMASK1') -- These network masks are the ones from allow-recursion in the Authoritative Server
     recursive_ips:addMask('NETWORKMASK2')
 
-    addAction(AndRule({NetmaskGroupRule(recursive_ips), RDRule()}), PoolAction('recursor'))
+    addAction(AndRule({RDRule(), NetmaskGroupRule(recursive_ips)}), PoolAction('recursor'))
     addAction(AllRule(), PoolAction('auth'))
 
 This configuration will route all recursive queries from the netmasks