Commit fd06c2e7 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

corrected fw zone exclusion in NATRule.init

parent bdc0328a
......@@ -18,9 +18,11 @@ local NATRule = model.class(model.Rule)
function NATRule:init(context)
model.Rule.init(self, context)
if util.contains({self['in'], self.out}, fwzone) then
for i, dir in ipairs({'in', 'out'}) do
if util.contains(self[dir], model.fwzone) then
error('NAT rules not allowed for firewall zone')
function NATRule:defaultzones() return {nil} end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment