comparison mod_firewall/mod_firewall.lua @ 2894:165d2877eeac

mod_firewall: Add experimental user-centric persistent marks behind a feature flag
author Kim Alvefur <zash@zash.se>
date Sat, 24 Feb 2018 21:40:56 +0100
parents 22e11645a895
children b0d92332b87f
comparison
equal deleted inserted replaced
2893:d958558e0058 2894:165d2877eeac
301 301
302 local definition_handlers = module:require("definitions"); 302 local definition_handlers = module:require("definitions");
303 local condition_handlers = module:require("conditions"); 303 local condition_handlers = module:require("conditions");
304 local action_handlers = module:require("actions"); 304 local action_handlers = module:require("actions");
305 305
306 if module:get_option_boolean("firewall_experimental_user_marks", false) then
307 module:require"marks";
308 end
309
306 local function new_rule(ruleset, chain) 310 local function new_rule(ruleset, chain)
307 assert(chain, "no chain specified"); 311 assert(chain, "no chain specified");
308 local rule = { conditions = {}, actions = {}, deps = {} }; 312 local rule = { conditions = {}, actions = {}, deps = {} };
309 table.insert(ruleset[chain], rule); 313 table.insert(ruleset[chain], rule);
310 return rule; 314 return rule;