From: Paul Donald Date: Sat, 14 Sep 2024 17:19:15 +0000 (+0200) Subject: luci-app-statistics: Fix variable scope X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=b4a25a19a960f6000b3a56c5596711c74b376b34;p=openwrt-luci.git luci-app-statistics: Fix variable scope Closes #7245 Signed-off-by: Paul Donald --- 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'; } } }