Software /
code /
prosody-modules
Diff
mod_firewall/conditions.lib.lua @ 2552:18b6a55dd5d6
mod_firewall: Support expressions in TO/FROM EXACTLY
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 23 Feb 2017 14:05:39 +0000 |
parent | 2545:9b46d24edf0d |
child | 2553:7ed2a66bfabd |
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua Thu Feb 23 14:01:12 2017 +0000 +++ b/mod_firewall/conditions.lib.lua Thu Feb 23 14:05:39 2017 +0000 @@ -66,11 +66,13 @@ end function condition_handlers.FROM_EXACTLY(from) - return ("from == %q"):format(from), { "from" }; + local metadeps = {}; + return ("from == %s"):format(metaq(from, metadeps)), { "from", unpack(metadeps) }; end function condition_handlers.TO_EXACTLY(to) - return ("to == %q"):format(to), { "to" }; + local metadeps = {}; + return ("to == %s"):format(metaq(to, metadeps)), { "to", unpack(metadeps) }; end function condition_handlers.TO_SELF()