mod_firewall/conditions.lib.lua
changeset 2123 5f6c18fd0161
parent 2120 2bb42ba342f3
child 2129 edf5cf3c474b
equal deleted inserted replaced
2122:643b254e75de 2123:5f6c18fd0161
    71 end
    71 end
    72 
    72 
    73 local function zone_check(zone, which)
    73 local function zone_check(zone, which)
    74 	local which_not = which == "from" and "to" or "from";
    74 	local which_not = which == "from" and "to" or "from";
    75 	return ("(zone_%s[%s_host] or zone_%s[%s] or zone_%s[bare_%s]) "
    75 	return ("(zone_%s[%s_host] or zone_%s[%s] or zone_%s[bare_%s]) "
    76 		.."and not(zone_%s[%s_host] or zone_%s[%s] or zone_%s[%s])"
    76 		.."and not(zone_%s[%s_host] or zone_%s[%s] or zone_%s[bare_%s])"
    77 		)
    77 		)
    78 		:format(zone, which, zone, which, zone, which,
    78 		:format(zone, which, zone, which, zone, which,
    79 		zone, which_not, zone, which_not, zone, which_not), {
    79 		zone, which_not, zone, which_not, zone, which_not), {
    80 			"split_to", "split_from", "bare_to", "bare_from", "zone:"..zone
    80 			"split_to", "split_from", "bare_to", "bare_from", "zone:"..zone
    81 		};
    81 		};