summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-splash/luasrc/view/admin_status/splash.htm
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-22 21:52:04 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-22 21:57:00 +0100
commitfac02283137f6ff59363695bb07a3f9cec58e577 (patch)
tree5c3c00701d39cabc86858d270d159ffb08aa52a5 /applications/luci-app-splash/luasrc/view/admin_status/splash.htm
parentb24dfd52ac4e45741bfe5049bf0f2e863ffffad2 (diff)
luci-app-splash: convert luci.sys.net.arptable() to luci.ip.neighbors()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'applications/luci-app-splash/luasrc/view/admin_status/splash.htm')
-rw-r--r--applications/luci-app-splash/luasrc/view/admin_status/splash.htm11
1 files changed, 7 insertions, 4 deletions
diff --git a/applications/luci-app-splash/luasrc/view/admin_status/splash.htm b/applications/luci-app-splash/luasrc/view/admin_status/splash.htm
index 67bb2fc49e..831fa75f65 100644
--- a/applications/luci-app-splash/luasrc/view/admin_status/splash.htm
+++ b/applications/luci-app-splash/luasrc/view/admin_status/splash.htm
@@ -9,6 +9,7 @@ local utl = require "luci.util"
local ipt = require "luci.sys.iptparser".IptParser()
local uci = require "luci.model.uci".cursor_state()
local wat = require "luci.tools.webadmin"
+local ipc = require "luci.ip"
local fs = require "nixio.fs"
local clients = { }
@@ -100,10 +101,12 @@ if fs.access(leasefile) then
end
end
-for i, a in ipairs(luci.sys.net.arptable()) do
- local c = clients[a["HW address"]:lower()]
- if c and not c.ip then
- c.ip = a["IP address"]
+for i, n in ipairs(ipc.neighbors({ family = 4 })) do
+ if n.mac and n.dest then
+ local c = clients[n.mac]
+ if c and not c.ip then
+ c.ip = n.dest:string()
+ end
end
end