# HG changeset patch # User Matthew Wild # Date 1488047781 0 # Node ID 0116672348c4d3cafffb9e077d81b98a93b348f0 # Parent aaff2716f022ee579bb5ee80355f73033289894b mod_firewall: Fix syntax error in generated code with some route modification actions diff -r aaff2716f022 -r 0116672348c4 mod_firewall/actions.lib.lua --- a/mod_firewall/actions.lib.lua Sat Feb 25 17:05:40 2017 +0000 +++ b/mod_firewall/actions.lib.lua Sat Feb 25 18:36:21 2017 +0000 @@ -122,11 +122,11 @@ local function route_modify(make_new, to, drop) local reroute, deps = "session.send(newstanza)", { "st" }; if to then - reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza);"):format(to); + reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza)"):format(to); deps[#deps+1] = "core_post_stanza"; end - return ([[local newstanza = st.%s; %s;%s]]) - :format(make_new, reroute, drop and " do return true end" or ""), deps; + return ([[do local newstanza = st.%s; %s;%s end]]) + :format(make_new, reroute, drop and " return true" or ""), deps; end function action_handlers.BOUNCE(with)