Commit 0e5d732b authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

explicit declaration of ipsets (with protocol family information)

parent 3b9746f7
......@@ -279,6 +279,10 @@ function Rule:trules()
local ipsetofrags = {}
for i, ipset in util.listpairs(self.ipset) do
if not ipset.name then error('Set name not defined') end
local setdef = awall.config.ipset and awall.config.ipset[ipset.name]
if not setdef then error('Invalid set name') end
if not ipset.args then
error('Set direction arguments not defined')
end
......@@ -290,7 +294,7 @@ function Rule:trules()
elseif arg == 'out' then setopts = setopts..'dst'
else error('Invalid set direction argument') end
end
table.insert(ipsetofrags, {opts=setopts})
table.insert(ipsetofrags, {family=setdef.family, opts=setopts})
end
res = combinations(res, ipsetofrags)
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