Commit 96184150 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

make the family attribute mandatory for ipset objects

incidentally, this makes all IP set-referring rules specific to one protocol family
parent ba12e5e2
......@@ -18,9 +18,9 @@ function IPSet:commands()
if self.config then
for name, params in pairs(self.config) do
if not params.type then error('Type not defined for set '..name) end
local line = 'create '..name..' '..params.type
if params.family then line = line..' family '..params.family end
table.insert(res, line..'\n')
if not params.family then error('Family not defined for set '..name) end
table.insert(res,
'create '..name..' '..params.type..' family '..params.family..'\n')
end
end
return res
......
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