projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: A disabled wireless network may be shown as enabled, when multiple networks...
[project/luci.git]
/
modules
/
luci-mod-admin-full
/
luasrc
/
view
/
admin_network
/
wifi_overview.htm
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
ea60a7f
..
4fc268e
100644
(file)
--- 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-2009 Steven Barth <steven@midlink.org>
- Copyright 2008-201
3
Jo-Philipp Wich <jow@openwrt.org>
+ Copyright 2008-201
5
Jo-Philipp Wich <jow@openwrt.org>
Licensed to the public under the Apache License 2.0.
-%>
<%-
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()
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 = { }
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 = { }
local netlist = { }
local netdevs = { }
@@
-181,7
+183,7
@@
for( var i = 0; i < st.length; i++ )
{
var iw = st[i];
for( var i = 0; i < st.length; i++ )
{
var iw = st[i];
- var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown');
+ var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown'
&& !iw.disabled
);
var p = iw.quality;
var q = is_assoc ? p : -1;
var p = iw.quality;
var q = is_assoc ? p : -1;