From 21dacf2db7899b1e90cb6d4fe6595f1991ba3635 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 27 Sep 2022 22:33:04 +0200 Subject: [PATCH] luci-base: sys.uc: reliably skip TIME_WAIT connections in conntrack list The TIME_WAIT indicator might not appear at the beginning of the tuple string in some cases, so match it anywhere. Signed-off-by: Kevin Darbyshire-Bryant [add commit message] Signed-off-by: Jo-Philipp Wich --- modules/luci-base/ucode/sys.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/ucode/sys.uc b/modules/luci-base/ucode/sys.uc index 33a7ac7d76..305499c797 100644 --- a/modules/luci-base/ucode/sys.uc +++ b/modules/luci-base/ucode/sys.uc @@ -67,7 +67,7 @@ export function conntrack_list(callback) { tuples = m[2]; } - if (index(tuples, 'TIME_WAIT ') === 0) + if (index(tuples, 'TIME_WAIT') !== -1) continue; let e = {