summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-02-10 20:52:34 +0100
committerJo-Philipp Wich <jo@mein.io>2022-02-10 20:52:34 +0100
commite6f21f84ca2adde0279f61fd2ae9637c44d4d86f (patch)
treef10b0d768d22e53484385d370e00b990e8f62b68 /modules
parent98d848917c41c87ee70a911f1c06f0468b0edb2f (diff)
luci-mod-status: nftables.js: align flow expr workaround with upstream
Ref: https://git.netfilter.org/nftables/commit/?id=160d44c91113849b9c09f6bbad159e10ded1ca54 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js6
1 files changed, 3 insertions, 3 deletions
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 6725d8c185..0a22a331d3 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
@@ -421,7 +421,7 @@ return view.extend({
case 'flow':
return E('span', {
'class': 'ifacebadge'
- }, action_translations.flow.format(spec.add));
+ }, action_translations.flow.format(spec.flowtable.replace(/^@/, '')));
default:
return E('span', {
@@ -460,8 +460,8 @@ return view.extend({
if (Array.isArray(spec.expr)) {
for (var i = 0; i < spec.expr.length; i++) {
// nftables JSON format bug, `flow` targets are currently not properly serialized
- if (typeof(spec.expr[i]) == 'string' && spec.expr[i].match(/^flow add @(\S+)$/))
- spec.expr[i] = { flow: { add: RegExp.$1 } };
+ if (typeof(spec.expr[i]) == 'string' && spec.expr[i].match(/^flow add (@\S+)$/))
+ spec.expr[i] = { flow: { op: "add", flowtable: RegExp.$1 } };
var res = this.renderExpr(spec.expr[i], spec.table);