diff options
-rw-r--r-- | awall/model.lua | 5 | ||||
-rw-r--r-- | awall/modules/filter.lua | 2 |
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 |