Commit 787fd259 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen
Browse files

use extra rule cache key in generated chain names

parent a309461a
...@@ -146,7 +146,10 @@ function M.Rule:init(...) ...@@ -146,7 +146,10 @@ function M.Rule:init(...)
end end
if self.service then 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 = maplist(
self.service, self.service,
function(s) function(s)
......
...@@ -120,7 +120,7 @@ function Filter:trules() ...@@ -120,7 +120,7 @@ function Filter:trules()
if not obj then if not obj then
if not src then src = self end if not src then src = self end
local params = {} local params = {label=(self.label and self.label..'-' or '')..key}
for i, attr in ipairs( for i, attr in ipairs(
{'in', 'out', 'src', 'dest', 'dnat', 'ipset', 'ipsec', 'service'} {'in', 'out', 'src', 'dest', 'dnat', 'ipset', 'ipsec', 'service'}
) do ) do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment