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>
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