:header: "RPZ Right Hand Side", "Knot Resolver Action", "BIND Compatibility"
"``.``", "``action`` is used", "compatible if ``action`` is :func:`policy.DENY`"
- "``*.``", "``action`` is used", "good enough [#]_ if ``action`` is :func:`policy.DENY`"
+ "``*.``", ":func:`policy.ANSWER`", "yes"
"``rpz-passthru.``", ":func:`policy.PASS`", "yes"
"``rpz-tcp-only.``", ":func:`policy.TC`", "yes"
"``rpz-drop.``", ":func:`policy.DROP`", "no [#]_"
"fake A/AAAA", ":func:`policy.ANSWER`", "yes"
"fake CNAME", "not supported", "no"
- .. [#] RPZ action ``*.`` in BIND causes *NODATA* answer
- but typically our users configure ``policy.rpz(policy.DENY, ...)``
- which replies with *NXDOMAIN*. Good news is that from client's
- perspective it does not make a visible difference.
.. [#] Our :func:`policy.DROP` returns *SERVFAIL* answer (for historical reasons).
local action_map = {
-- RPZ Policy Actions
['\0'] = action,
- ['\1*\0'] = action, -- deviates from RPZ spec
+ ['\1*\0'] = policy.ANSWER({}, true),
['\012rpz-passthru\0'] = policy.PASS, -- the grammar...
['\008rpz-drop\0'] = policy.DROP,
['\012rpz-tcp-only\0'] = policy.TC,
check_answer('"CNAME ." return NXDOMAIN',
'nxdomain.', kres.type.A, kres.rcode.NXDOMAIN)
check_answer('"CNAME *." return NXDOMAIN',
- 'nodata.', kres.type.A, kres.rcode.NXDOMAIN)
+ 'nodata.', kres.type.A, kres.rcode.NOERROR)
check_answer('"CNAME rpz-drop." be dropped',
'rpzdrop.', kres.type.A, kres.rcode.SERVFAIL)
check_answer('"CNAME rpz-passthru" return A rrset',