luci-lua-runtime: Update sys.net.conntrack() to use to conntrack tool
authorjpfox156 <[email protected]>
Fri, 25 Feb 2022 13:27:36 +0000 (23:27 +1000)
committerPaul Donald <[email protected]>
Thu, 2 Oct 2025 13:43:16 +0000 (15:43 +0200)
commitc62117c665b9de6198a092e1f72d6c68134cbd51
tree2eb883952ac0f29c56a995c22f4d0c80059109c3
parent18786c56a850476d152a50b612a5254fcc5e94c3
luci-lua-runtime: Update sys.net.conntrack() to use to conntrack tool

Fall through to /usr/sbin/conntrack tool if /proc/net/nf_conntrack is
not available.

/proc/net/nf_conntrack has been obsoleted in recent kernels
(https://cateee.net/lkddb/web-lkddb/NF_CONNTRACK_PROCFS.html). This
change enables sys.net.conntrack() to return conntrack information via
the /usr/sbin/conntrack tool (if installed) instead.

Enables population of the /luci/admin/status/realtime/connections list.

Signed-off-by: James Fox <[email protected]>
[ format using tabs ]
Signed-off-by: Paul Donald <[email protected]>
modules/luci-lua-runtime/luasrc/sys.lua