comparison mod_firewall/actions.lib.lua @ 3371:68842409f4e7

mod_firewall: Improve logging on chain return
author Matthew Wild <mwild1@gmail.com>
date Wed, 07 Nov 2018 12:38:03 +0000
parents 0fb95dc11bc8
children 78049e8b5a6b
comparison
equal deleted inserted replaced
3370:c414a7e884b3 3371:68842409f4e7
196 return ([[do 196 return ([[do
197 local ret = fire_event(%q, event); 197 local ret = fire_event(%q, event);
198 log('debug', 'chain \"%%s\" returned %%s', %q, tostring(ret)); 198 log('debug', 'chain \"%%s\" returned %%s', %q, tostring(ret));
199 if ret ~= nil then 199 if ret ~= nil then
200 if ret == false then 200 if ret == false then
201 log("debug", "Chain accepted stanza");
201 return pass_return; 202 return pass_return;
202 end 203 end
204 log("debug", "Chain rejected stanza");
203 return ret; 205 return ret;
204 end 206 end
207 log("debug", "Chain did not accept or reject stanza");
205 end]]):format("firewall/chains/"..name, name); 208 end]]):format("firewall/chains/"..name, name);
206 end 209 end
207 210
208 function action_handlers.MARK_ORIGIN(name) 211 function action_handlers.MARK_ORIGIN(name)
209 return [[session.firewall_marked_]]..idsafe(name)..[[ = current_timestamp;]], { "timestamp" }; 212 return [[session.firewall_marked_]]..idsafe(name)..[[ = current_timestamp;]], { "timestamp" };