Mercurial > prosody-modules
comparison mod_firewall/actions.lib.lua @ 2107:f445f43b9ba1
mod_firewall: Add support for session marking (MARK_ORIGIN, UNMARK_ORIGIN, ORIGIN_MARKED)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 17 Mar 2016 11:27:10 +0000 |
parents | f2ee508315e1 |
children | edf5cf3c474b |
comparison
equal
deleted
inserted
replaced
2106:f2ee508315e1 | 2107:f445f43b9ba1 |
---|---|
181 | 181 |
182 function action_handlers.JUMP_CHAIN(name) | 182 function action_handlers.JUMP_CHAIN(name) |
183 return ("if fire_event(%q, event) then return true; end"):format("firewall/chains/"..name); | 183 return ("if fire_event(%q, event) then return true; end"):format("firewall/chains/"..name); |
184 end | 184 end |
185 | 185 |
186 function action_handlers.MARK_ORIGIN(name) | |
187 return [[session.firewall_marked_]]..idsafe(name)..[[ = current_timestamp;]], { "timestamp" }; | |
188 end | |
189 | |
190 function action_handlers.UNMARK_ORIGIN(name) | |
191 return [[session.firewall_marked_]]..idsafe(name)..[[ = nil;]] | |
192 end | |
193 | |
186 return action_handlers; | 194 return action_handlers; |