Overriding records makes more sense on a particular name
than in a whole sub-tree.
-- 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') }))