aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--awall/model.lua5
-rw-r--r--awall/modules/filter.lua2
2 files changed, 6 insertions, 1 deletions
diff --git a/awall/model.lua b/awall/model.lua
index e6075cb..41e68ec 100644
--- a/awall/model.lua
+++ b/awall/model.lua
@@ -47,6 +47,11 @@ function M.ConfigObject:create(cls, params)
self:error('Support for '..name..' objects not installed')
end
end
+
+ if self.label then
+ params.label = self.label..(params.label and '-'..params.label or '')
+ end
+
return cls.morph(params, self.context, self.location)
end
diff --git a/awall/modules/filter.lua b/awall/modules/filter.lua
index 527dfa3..d6cfd3a 100644
--- a/awall/modules/filter.lua
+++ b/awall/modules/filter.lua
@@ -121,7 +121,7 @@ function Filter:trules()
local obj = self.extrarules[key]
if not obj then
- local params = {label=(self.label and self.label..'-' or '')..label}
+ local params = {label=label}
for i, attr in ipairs(
{'in', 'out', 'src', 'dest', 'dnat', 'ipset', 'ipsec', 'service'}
) do