Commit be8890f6 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

ConfigObject: inherit parent's label

parent e04e525a
......@@ -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
......
......@@ -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
......
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