--- a/mod_firewall/actions.lib.lua Mon Feb 20 09:47:40 2017 +0000
+++ b/mod_firewall/actions.lib.lua Mon Feb 20 09:47:58 2017 +0000
@@ -187,4 +187,11 @@
return [[session.firewall_marked_]]..idsafe(name)..[[ = nil;]]
end
+function action_handlers.ADD_TO(spec)
+ local list_name, value = spec:match("(%S+) (.+)");
+ local meta_deps = {};
+ value = meta(("%q"):format(value), meta_deps);
+ return ("list_%s:add(%s);"):format(list_name, value), { "list:"..list_name, unpack(meta_deps) };
+end
+
return action_handlers;