aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-04-03 00:10:03 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-04-03 00:25:30 +0300
commit787fd259d015c926c2cf3e88b7271a1ca4441a51 (patch)
tree9052bf9be04b1f5f812148a2ba7886b978940356
parenta309461ab644c7ea9908c25b9a32f6d206072674 (diff)
downloadawall-787fd259d015c926c2cf3e88b7271a1ca4441a51.tar.bz2
awall-787fd259d015c926c2cf3e88b7271a1ca4441a51.tar.xz
use extra rule cache key in generated chain namesv1.2.0
-rw-r--r--awall/model.lua5
-rw-r--r--awall/modules/filter.lua2
2 files changed, 5 insertions, 2 deletions
diff --git a/awall/model.lua b/awall/model.lua
index 80349fc..c125c87 100644
--- a/awall/model.lua
+++ b/awall/model.lua
@@ -146,7 +146,10 @@ function M.Rule:init(...)
end
if self.service then
- if type(self.service) == 'string' then self.label = self.service end
+ if not self.label and type(self.service) == 'string' then
+ self.label = self.service
+ end
+
self.service = maplist(
self.service,
function(s)
diff --git a/awall/modules/filter.lua b/awall/modules/filter.lua
index a9e8bb9..abd3e77 100644
--- a/awall/modules/filter.lua
+++ b/awall/modules/filter.lua
@@ -120,7 +120,7 @@ function Filter:trules()
if not obj then
if not src then src = self end
- local params = {}
+ local params = {label=(self.label and self.label..'-' or '')..key}
for i, attr in ipairs(
{'in', 'out', 'src', 'dest', 'dnat', 'ipset', 'ipsec', 'service'}
) do