summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/model/network.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/model/network.lua')
-rw-r--r--modules/luci-base/luasrc/model/network.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua
index c8ec5364ed..056fc67b14 100644
--- a/modules/luci-base/luasrc/model/network.lua
+++ b/modules/luci-base/luasrc/model/network.lua
@@ -330,7 +330,7 @@ function init(cursor)
if i.family == "packet" then
_interfaces[name].flags = i.flags
_interfaces[name].stats = i.data
- _interfaces[name].macaddr = i.addr
+ _interfaces[name].macaddr = ipc.checkmac(i.addr)
elseif i.family == "inet" then
_interfaces[name].ipaddrs[#_interfaces[name].ipaddrs+1] = ipc.IPv4(i.addr, i.netmask)
elseif i.family == "inet6" then
@@ -1233,8 +1233,7 @@ function interface.name(self)
end
function interface.mac(self)
- local mac = self:_ubus("macaddr")
- return mac and mac:upper()
+ return ipc.checkmac(self:_ubus("macaddr"))
end
function interface.ipaddrs(self)