diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-22 18:45:28 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-22 18:45:28 +0100 |
commit | 213595ce858c53189b9f585f0d0453aeae63c8d0 (patch) | |
tree | 1ad3ca086e1b5ac072ebcc25c333a85e63733066 /modules/luci-mod-admin-full/luasrc/view | |
parent | 577b772824bae3e2a35c6eb404796a04776e9f14 (diff) |
luci-mod-admin-full: convert luci.sys.net.arptable() to luci.ip.neighbors()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm index ea60a7f078..b7c44f9073 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm @@ -1,12 +1,12 @@ <%# Copyright 2008-2009 Steven Barth <steven@midlink.org> - Copyright 2008-2013 Jo-Philipp Wich <jow@openwrt.org> + Copyright 2008-2015 Jo-Philipp Wich <jow@openwrt.org> Licensed to the public under the Apache License 2.0. -%> <%- - local sys = require "luci.sys" + local ip = require "luci.ip" local fs = require "nixio.fs" local utl = require "luci.util" local uci = require "luci.model.uci".cursor() @@ -90,7 +90,9 @@ local devices = ntm:get_wifidevs() local arpcache = { } - sys.net.arptable(function(e) arpcache[e["HW address"]:upper()] = e["IP address"] end) + ip.neighbors({ family = 4 }, function(n) + if n.mac and n.dest then arpcache[n.mac:upper()] = n.dest:string() end + end) local netlist = { } local netdevs = { } |