Commit fd06c2e7 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

corrected fw zone exclusion in NATRule.init

parent bdc0328a
...@@ -18,8 +18,10 @@ local NATRule = model.class(model.Rule) ...@@ -18,8 +18,10 @@ local NATRule = model.class(model.Rule)
function NATRule:init(context) function NATRule:init(context)
model.Rule.init(self, context) model.Rule.init(self, context)
if util.contains({self['in'], self.out}, fwzone) then for i, dir in ipairs({'in', 'out'}) do
error('NAT rules not allowed for firewall zone') if util.contains(self[dir], model.fwzone) then
error('NAT rules not allowed for firewall zone')
end end
end 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