aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-04-16 23:29:00 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-04-16 23:29:00 +0300
commitb682015ffdea4287f8918550ee2d013c074c0af7 (patch)
tree5cfbff68cd35daf04c79ad10020e246b14813f68
parent8e84eb17bd4b3c91f3c9607dcf6c4cbb2e3b9198 (diff)
downloadawall-b682015ffdea4287f8918550ee2d013c074c0af7.tar.bz2
awall-b682015ffdea4287f8918550ee2d013c074c0af7.tar.xz
do not generate superfluous chain when 'dnat' used without 'dest'v1.2.1
-rw-r--r--awall/model.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/awall/model.lua b/awall/model.lua
index c125c87..17fbd12 100644
--- a/awall/model.lua
+++ b/awall/model.lua
@@ -449,8 +449,9 @@ function M.Rule:trules()
combined = {}
for i, ofrag in ipairs(res) do
- local cc = combinations({ofrag}, addrofrags)
- if #cc < #addrofrags then
+ local aofs = combinations(addrofrags, {{family=ofrag.family}})
+ local cc = combinations({ofrag}, aofs)
+ if #cc < #aofs then
combined = nil
break
end