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>
This commit is contained in:
parent
98d848917c
commit
e6f21f84ca
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue