mod_firewall/mod_firewall.lua
changeset 2408 9af2d36567a8
parent 2406 2040330586e4
child 2416 9159f9166893
equal deleted inserted replaced
2407:f96bdfd81eba 2408:9af2d36567a8
   303 				state = "rules";
   303 				state = "rules";
   304 				rule = new_rule(ruleset, chain);
   304 				rule = new_rule(ruleset, chain);
   305 			end
   305 			end
   306 			-- Check standard modifiers for the condition (e.g. NOT)
   306 			-- Check standard modifiers for the condition (e.g. NOT)
   307 			local negated;
   307 			local negated;
   308 			local condition = line:match("^[^:=%.]*");
   308 			local condition = line:match("^[^:=%.?]*");
   309 			if condition:find("%f[%w]NOT%f[^%w]") then
   309 			if condition:find("%f[%w]NOT%f[^%w]") then
   310 				local s, e = condition:match("%f[%w]()NOT()%f[^%w]");
   310 				local s, e = condition:match("%f[%w]()NOT()%f[^%w]");
   311 				condition = (condition:sub(1,s-1)..condition:sub(e+1, -1)):match("^%s*(.-)%s*$");
   311 				condition = (condition:sub(1,s-1)..condition:sub(e+1, -1)):match("^%s*(.-)%s*$");
   312 				negated = true;
   312 				negated = true;
   313 			end
   313 			end