From b4a25a19a960f6000b3a56c5596711c74b376b34 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Sat, 14 Sep 2024 19:19:15 +0200 Subject: luci-app-statistics: Fix variable scope Closes #7245 Signed-off-by: Paul Donald --- applications/luci-app-statistics/root/usr/libexec/stat-genconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/luci-app-statistics/root/usr/libexec/stat-genconfig b/applications/luci-app-statistics/root/usr/libexec/stat-genconfig index 1bf622d9c1..f184e880b2 100755 --- a/applications/luci-app-statistics/root/usr/libexec/stat-genconfig +++ b/applications/luci-app-statistics/root/usr/libexec/stat-genconfig @@ -196,7 +196,7 @@ function config_iptables(c) { let tname = `${s.table}`; let chain = `${s.chain}`; - if (match(tname, /^\S+$/) && match(chain, /^\S+$/) && match(rule, /^\S+$/) && match(name, /^\S+$/)) { + if (match(tname, /^\S+$/) && match(chain, /^\S+$/) { str += `\t${verb} "${tname}" "${chain}"`; let rule = `${s.rule}`; @@ -208,10 +208,10 @@ function config_iptables(c) { if (match(name, /^\S+$/)) str += ` "${name}"`; - } + } - str += '\n'; } + str += '\n'; } } } -- cgit v1.2.3