diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2016-02-02 11:52:33 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2016-02-02 11:52:51 +0100 |
commit | d65235f64a83ee5ebb54c5e6f97689c8ae5dcba9 (patch) | |
tree | 3f6e4fb53e5a73f1158adf7eff18ba21a7727280 /modules/luci-base | |
parent | c2cf5d185587c3ad8d550c39707e744ee2b0811d (diff) |
luci-base: fix parsing of non-TCP streams in conntrack table
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/luasrc/sys.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/luci-base/luasrc/sys.lua b/modules/luci-base/luasrc/sys.lua index ae3565245..fb2c4b1f8 100644 --- a/modules/luci-base/luasrc/sys.lua +++ b/modules/luci-base/luasrc/sys.lua @@ -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 = { |