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 ' end
local line = 'create '' '..params.type
if then line = line..' family ' end
table.insert(res, line..'\n')
if not then error('Family not defined for set ' end
'create '' '..params.type..' family ''\n')
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