From 3ed815fe4a313d33d20ada59cfb17129fbf217ef Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 15 Oct 2025 15:23:19 +0200 Subject: [PATCH] luci-mod-status: handle ct helpers in nftables These appear when modules such as the following are installed: -kmod-nf-nathelper -kmod-nf-nathelper-extra They render as e.g.: Utilise *ftp* conntrack helper when fw4 rules similar to the following exist ``` table inet fw4 { chain helper_lan { tcp dport 21 ct helper set "ftp" comment "!fw4: FTP passive connection tracking" } } ``` ht @dave14305 for the working code diff Signed-off-by: Paul Donald --- .../htdocs/luci-static/resources/view/status/nftables.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js index 4feac4690c..4862c90e2a 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js @@ -138,6 +138,7 @@ var action_translations = { 'return': _('Continue in calling chain'), + 'ct helper': _('Utilise %h conntrack helper'), 'flow': _('Utilize flow table %h') }; @@ -168,6 +169,7 @@ return view.extend({ case 'masquerade': case 'return': case 'flow': + case 'ct helper': case 'log': return true; } @@ -407,6 +409,11 @@ return view.extend({ case 'match': return this.renderMatchExpr(spec); + case 'ct helper': + return E('span', { + 'class': 'ifacebadge' + }, action_translations[kind].format(spec)); + case 'reject': var k = 'reject.%s'.format(spec.type); -- 2.30.2