]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules/policy docs: tweak an example
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 19 Nov 2021 13:03:50 +0000 (14:03 +0100)
committerOto Šťáva <oto.stava@gmail.com>
Fri, 19 Nov 2021 14:57:17 +0000 (15:57 +0100)
Overriding records makes more sense on a particular name
than in a whole sub-tree.

modules/policy/README.rst

index 3eb540cc2108b978b44d68023af4ffb87c73b30a..3260b27f8ef78402fc558c0fdfa5ce78b09dad89 100644 (file)
@@ -178,13 +178,13 @@ Following actions stop the policy matching on the query, i.e. other rules are no
 
       -- policy to change IPv4 address and TTL for example.com
       policy.add(
-          policy.suffix(
+          policy.domains(
               policy.ANSWER(
                   { [kres.type.A] = { rdata=kres.str2ip('192.0.2.7'), ttl=300 } }
               ), { todname('example.com') }))
       -- policy to generate two TXT records (specified in binary format) for example.net
       policy.add(
-          policy.suffix(
+          policy.domains(
               policy.ANSWER(
                   { [kres.type.TXT] = { rdata={'\005first', '\006second'}, ttl=5 } }
               ), { todname('example.net') }))