# HG changeset patch # User Matthew Wild # Date 1458132137 0 # Node ID a1e9ca4cb18127c8e06eaefb6919cdbbe7c23838 # Parent 7b9520479e9995133967684e993bc4410c451634 mod_firewall: BOUNCE: Don't bounce error stanzas or iq results diff -r 7b9520479e99 -r a1e9ca4cb181 mod_firewall/actions.lib.lua --- a/mod_firewall/actions.lib.lua Wed Mar 16 11:46:47 2016 +0000 +++ b/mod_firewall/actions.lib.lua Wed Mar 16 12:42:17 2016 +0000 @@ -142,7 +142,11 @@ else text = "nil"; end - return route_modify(("error_reply(stanza, %s, %s, %s)"):format(error_type, error, text), nil, true); + local route_modify_code, deps = route_modify(("error_reply(stanza, %s, %s, %s)"):format(error_type, error, text), nil, true); + deps[#deps+1] = "type"; + deps[#deps+1] = "name"; + return [[if type == "error" or (name == "iq" and type == "result") then return true; end -- Don't reply to 'error' stanzas, or iq results + ]]..route_modify_code, deps; end function action_handlers.REDIRECT(where)