# HG changeset patch # User Matthew Wild # Date 1487858739 0 # Node ID 18b6a55dd5d676a72caa33cca4ab58e79b024d85 # Parent 9392f45b0364c0b14658225a6b252fc7892f4074 mod_firewall: Support expressions in TO/FROM EXACTLY diff -r 9392f45b0364 -r 18b6a55dd5d6 mod_firewall/conditions.lib.lua --- 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()