Bugfixes
--------
- cache: missing filesystem support for pre-allocation is no longer fatal (#549)
+- lua: policy.rpz() no longer watches the file when watch is set to false (!954)
Knot Resolver 5.0.1 (2020-02-05)
Like suffix match, but you can also provide a common suffix of all matches for faster processing (nil otherwise).
This function is faster for small suffix tables (in the order of "hundreds").
-.. function:: policy.rpz(action, path, [watch])
+.. function:: policy.rpz(action, path, [watch = true])
:param action: the default action for match in the zone; typically you want ``policy.DENY``
:param path: path to zone file | database
- :param watch: boolean, if not false, the file will be reloaded on file change
+ :param watch: boolean, if true, the file will be reloaded on file change
Enforce RPZ_ rules. This can be used in conjunction with published blocklist feeds.
The RPZ_ operation is well described in this `Jan-Piet Mens's post`_,
function policy.rpz(action, path, watch)
local rules = rpz_parse(action, path)
- if watch or true then
+ if watch ~= false then
local has_notify, notify = pcall(require, 'cqueues.notify')
if has_notify then
local bit = require('bit')