From 103f89f57494781d43c8a6b545185b5bca8f0e15 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Tue, 2 Aug 2016 20:12:46 +0300 Subject: [PATCH] custom match options --- awall/model.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/awall/model.lua b/awall/model.lua index c768b70..ecc1a42 100644 --- a/awall/model.lua +++ b/awall/model.lua @@ -492,6 +492,8 @@ function M.Rule:trules() res = combinations(res, ipsetofrags) end + if self.match then res = combinations(res, {{opts=self.match}}) end + res = combinations(res, self:servoptfrags()) setfamilies(res) @@ -597,7 +599,10 @@ function M.Rule:extrarules(label, cls, options) local params = {} for _, attr in ipairs( - extend({'in', 'out', 'src', 'dest', 'ipset', 'service'}, options.attrs) + extend( + {'in', 'out', 'src', 'dest', 'ipset', 'match', 'service'}, + options.attrs + ) ) do params[attr] = (options.src or self)[attr] end -- GitLab