projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15cc74c
)
luci-base: network.js: filter invalid mac addresses
author
Jo-Philipp Wich
<jo@mein.io>
Wed, 18 Sep 2019 05:46:33 +0000
(07:46 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Wed, 18 Sep 2019 05:46:33 +0000
(07:46 +0200)
Only consider valid ethernet mac addresses when building the device state
from raw getifaddrs() information.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/network.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/network.js
b/modules/luci-base/htdocs/luci-static/resources/network.js
index c3c20304e5ef0da63140b448f8d9f4cdf6d3b199..d0282ad01f11503edd0022b06a88bd53d650b96a 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/network.js
@@
-463,7
+463,9
@@
function initNetworkState(refresh) {
if (a.family == 'packet') {
s.netdevs[name].flags = a.flags;
s.netdevs[name].stats = a.data;
- s.netdevs[name].macaddr = a.addr;
+
+ if (a.addr != null && a.addr != '00:00:00:00:00:00' && a.addr.length == 17)
+ s.netdevs[name].macaddr = a.addr;
}
else if (a.family == 'inet') {
s.netdevs[name].ipaddrs.push(a.addr + '/' + a.netmask);