From: Vladimír Čunát Date: Fri, 19 Nov 2021 13:03:50 +0000 (+0100) Subject: modules/policy docs: tweak an example X-Git-Tag: v5.4.3~7^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee8993bdaa38bc44f90620bc3b102b940d42d438;p=thirdparty%2Fknot-resolver.git modules/policy docs: tweak an example Overriding records makes more sense on a particular name than in a whole sub-tree. --- diff --git a/modules/policy/README.rst b/modules/policy/README.rst index 3eb540cc2..3260b27f8 100644 --- a/modules/policy/README.rst +++ b/modules/policy/README.rst @@ -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') }))