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 <ldir@darbyshire-bryant.me.uk>
[add commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2022-09-27 22:33:04 +02:00
parent e496014760
commit 21dacf2db7

View file

@ -67,7 +67,7 @@ export function conntrack_list(callback) {
tuples = m[2]; tuples = m[2];
} }
if (index(tuples, 'TIME_WAIT ') === 0) if (index(tuples, 'TIME_WAIT') !== -1)
continue; continue;
let e = { let e = {