Commit 103f89f5 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

custom match options

parent 1d184a9f
...@@ -492,6 +492,8 @@ function M.Rule:trules() ...@@ -492,6 +492,8 @@ function M.Rule:trules()
res = combinations(res, ipsetofrags) res = combinations(res, ipsetofrags)
end end
if self.match then res = combinations(res, {{opts=self.match}}) end
res = combinations(res, self:servoptfrags()) res = combinations(res, self:servoptfrags())
setfamilies(res) setfamilies(res)
...@@ -597,7 +599,10 @@ function M.Rule:extrarules(label, cls, options) ...@@ -597,7 +599,10 @@ function M.Rule:extrarules(label, cls, options)
local params = {} local params = {}
for _, attr in ipairs( for _, attr in ipairs(
extend({'in', 'out', 'src', 'dest', 'ipset', 'service'}, options.attrs) extend(
{'in', 'out', 'src', 'dest', 'ipset', 'match', 'service'},
options.attrs
)
) do ) do
params[attr] = (options.src or self)[attr] params[attr] = (options.src or self)[attr]
end end
......
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