X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fsys.lua;fp=modules%2Fluci-base%2Fluasrc%2Fsys.lua;h=a97271732ad0f2d0d72db2b4695963dc391e9e3f;hp=fb2c4b1f8932784ece196e12a0349a264f9a9625;hb=4323935a1eab53f3109066ec08c8cdfcdf69db75;hpb=6ee5c593b3599af3696d3a1eb3440137f863a378 diff --git a/modules/luci-base/luasrc/sys.lua b/modules/luci-base/luasrc/sys.lua index fb2c4b1f8..a97271732 100644 --- a/modules/luci-base/luasrc/sys.lua +++ b/modules/luci-base/luasrc/sys.lua @@ -343,7 +343,11 @@ function net.conntrack(callback) for key, val in tuples:gmatch("(%w+)=(%S+)") do if key == "bytes" or key == "packets" then entry[key] = entry[key] + tonumber(val, 10) - elseif key == "src" or key == "dst" or key == "sport" or key == "dport" then + elseif key == "src" or key == "dst" then + if entry[key] == nil then + entry[key] = luci.ip.new(val):string() + end + elseif key == "sport" or key == "dport" then if entry[key] == nil then entry[key] = val end