diff options
author | Paul Donald <newtwen+github@gmail.com> | 2024-09-14 19:19:15 +0200 |
---|---|---|
committer | Paul Donald <newtwen+github@gmail.com> | 2024-09-14 20:42:51 +0200 |
commit | b4a25a19a960f6000b3a56c5596711c74b376b34 (patch) | |
tree | cf02704d62b99c9cc4274927e9e851efa018de1a | |
parent | ae6de0c7f44017015770079cec62514f3166a1a4 (diff) |
luci-app-statistics: Fix variable scope
Closes #7245
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
-rwxr-xr-x | applications/luci-app-statistics/root/usr/libexec/stat-genconfig | 6 |
1 files 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'; } } } |