luci-base: fix parsing of non-TCP streams in conntrack table
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
c2cf5d1855
commit
d65235f64a
1 changed files with 3 additions and 5 deletions
|
@ -325,12 +325,10 @@ function net.conntrack(callback)
|
|||
|
||||
local line, connt = nil, (not callback) and { }
|
||||
for line in nfct do
|
||||
local fam, l3, l4, timeout, state, tuples =
|
||||
line:match("^(ipv[46]) +(%d+) +%S+ +(%d+) +(%d+) +([A-Z_]+) +(.+)$")
|
||||
local fam, l3, l4, timeout, tuples =
|
||||
line:match("^(ipv[46]) +(%d+) +%S+ +(%d+) +(%d+) +(.+)$")
|
||||
|
||||
if fam and l3 and l4 and timeout and state and tuples and
|
||||
state ~= "TIME_WAIT"
|
||||
then
|
||||
if fam and l3 and l4 and timeout and not tuples:match("^TIME_WAIT ") then
|
||||
l4 = nixio.getprotobynumber(l4)
|
||||
|
||||
local entry = {
|
||||
|
|
Loading…
Reference in a new issue