end
end
end
- return state
+ return
end
-- Enforce policy action
policy.layer = {
begin = function(state, req)
req = kres.request_t(req)
- return policy.evaluate(policy.rules, req, req:current(), state)
- end,
+ return policy.evaluate(policy.rules, req, req:current(), state) or
+ policy.evaluate(policy.special_names, req, req:current(), state) or
+ state
+ end,
finish = function(state, req)
req = kres.request_t(req)
- return policy.evaluate(policy.postrules, req, req:current(), state)
+ return policy.evaluate(policy.postrules, req, req:current(), state) or state
end
}
-- @var Default rules
policy.rules = {}
policy.postrules = {}
-policy.add(policy.suffix_common(policy.DENY, private_zones, '\4arpa\0'))
+policy.special_names = {
+ {
+ id=0,
+ cb=policy.suffix_common(policy.DENY, private_zones, '\4arpa\0'),
+ count=0
+ }
+}
return policy