diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-03-16 09:41:32 +0000 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-03-16 09:41:32 +0000 |
commit | 0e5d732b21d25facf2b0e08b8c95a3bf169976ff (patch) | |
tree | 5b8c23866300cdcfeff7995ed2077315c3e153ad | |
parent | 3b9746f7d67b34e7fbfdda10f63fb2d60813c31d (diff) | |
download | awall-0e5d732b21d25facf2b0e08b8c95a3bf169976ff.tar.bz2 awall-0e5d732b21d25facf2b0e08b8c95a3bf169976ff.tar.xz |
explicit declaration of ipsets (with protocol family information)
-rw-r--r-- | awall/model.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/awall/model.lua b/awall/model.lua index 92cb471..d2dc0b2 100644 --- a/awall/model.lua +++ b/awall/model.lua @@ -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 |