]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
stop using makeRule, update Qname to QName so links should work 14794/head
authorphonedph1 <ph1@slurpee3>
Thu, 24 Oct 2024 02:19:26 +0000 (20:19 -0600)
committerphonedph1 <ph1@slurpee3>
Thu, 24 Oct 2024 02:19:26 +0000 (20:19 -0600)
pdns/dnsdistdist/docs/advanced/axfr.rst
pdns/dnsdistdist/docs/advanced/ebpf.rst
pdns/dnsdistdist/docs/reference/dq.rst
pdns/dnsdistdist/docs/reference/rules-management.rst

index 822e7fc587f6728b17c16cbc3825a02bec4d2c55..a4c104bb3cf7896850b12987a4965aae3a91335f 100644 (file)
@@ -21,7 +21,7 @@ The first issue can be solved by routing SOA, AXFR and IXFR requests explicitly
 The second one might require allowing AXFR/IXFR from the :program:`dnsdist` source address
 and moving the source address check to :program:`dnsdist`'s side::
 
-  addAction(AndRule({OrRule({QTypeRule(DNSQType.AXFR), QTypeRule(DNSQType.IXFR)}), NotRule(makeRule("192.168.1.0/24"))}), RCodeAction(DNSRCode.REFUSED))
+  addAction(AndRule({OrRule({QTypeRule(DNSQType.AXFR), QTypeRule(DNSQType.IXFR)}), NotRule(NetmaskGroupRule("192.168.1.0/24"))}), RCodeAction(DNSRCode.REFUSED))
 
 .. versionchanged:: 1.4.0
   Before 1.4.0, the QTypes were in the ``dnsdist`` namespace. Use ``dnsdist.AXFR`` and ``dnsdist.IXFR`` in these versions.
@@ -55,7 +55,7 @@ and not the primary's one. One way to fix this issue is to allow NOTIFY from the
 address on the secondary side (for example with PowerDNS's `trusted-notification-proxy`) and move the address
 check to :program:`dnsdist`'s side::
 
-  addAction(AndRule({OpcodeRule(DNSOpcode.Notify), NotRule(makeRule("192.168.1.0/24"))}), RCodeAction(DNSRCode.REFUSED))
+  addAction(AndRule({OpcodeRule(DNSOpcode.Notify), NotRule(NetmaskGroupRule("192.168.1.0/24"))}), RCodeAction(DNSRCode.REFUSED))
 
 .. versionchanged:: 1.4.0
   Before 1.4.0, the RCodes were in the ``dnsdist`` namespace. Use ``dnsdist.REFUSED`` in these versions.
index 97f4689bab65e60387b7ce31859bf546a04fb0a5..5b76b91b98e8dc5b5f61fed369ae5a8f91a7f375 100644 (file)
@@ -43,7 +43,7 @@ The :meth:`BPFFilter:blockQName` method can be used to block queries based on th
 Using the 255 (ANY) qtype will block all queries for the qname, regardless of the qtype.
 Contrary to source address filtering, qname filtering only works over UDP. TCP qname filtering can be done the usual way::
 
-  addAction(AndRule({TCPRule(true), makeRule("evildomain.com")}), DropAction())
+  addAction(AndRule({TCPRule(true), QNameSuffixRule("evildomain.com")}), DropAction())
 
 The :meth:`BPFFilter:attachToAllBinds` method attaches the filter to every existing bind at runtime. It cannot use at configuration time. The :func:`setDefaultBPFFilter()` should be used at configuration time.
 
index 69bd0a2bb92c6fa8a16e01143f9cd6f03dffe34c..7b0ede948585d3b7bacb5686439d14da3bdc4dac 100644 (file)
@@ -266,7 +266,7 @@ This state can be modified from the various hooks.
         dq:setContent(raw)
         return DNSAction.Allow
       end
-      addAction(AndRule({QTypeRule(DNSQType.A), makeRule('custom.async.tests.powerdns.com')}), LuaAction(replaceQueryPayload))
+      addAction(AndRule({QTypeRule(DNSQType.A), QNameSuffixRule('custom.async.tests.powerdns.com')}), LuaAction(replaceQueryPayload))
 
     :param string data: The raw DNS payload
 
index 3c70c04bff66d2a3dec734e8fc39ba2452b88a65..29bd976304e7dd8834e9c1fccb7017b3a8ddd927 100644 (file)
@@ -587,7 +587,7 @@ Convenience Functions
 .. function:: makeRule(rule)
 
   .. versionchanged:: 1.9.0
-    This function is deprecated, please use :func:`NetmaskGroupRule` or :func:`QnameSuffixRule` instead
+    This function is deprecated, please use :func:`NetmaskGroupRule` or :func:`QNameSuffixRule` instead
 
   Make a :func:`NetmaskGroupRule` or a :func:`SuffixMatchNodeRule`, depending on how it is called.
   The `rule` parameter can be a string, or a list of strings, that should contain either: