git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
175cd03
)
modules/admin-full: fix crash on network interface overview page
author
Jo-Philipp Wich
<redacted>
Mon, 19 Apr 2010 18:07:30 +0000
(18:07 +0000)
committer
Jo-Philipp Wich
<redacted>
Mon, 19 Apr 2010 18:07:30 +0000
(18:07 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/network.lua
patch
|
blob
|
history
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_network/network.lua
b/modules/admin-full/luasrc/model/cbi/admin_network/network.lua
index fffb3e50f2b3c53e491ea998915869ac095b77fc..8adfbf1372284259bf0b44e18afc8aa1fbce4158 100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_network/network.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_network/network.lua
@@
-86,8
+86,11
@@
end
hwaddr = s:option(DummyValue, "_hwaddr",
translate("<abbr title=\"Media Access Control\">MAC</abbr>-Address"),
translate("Hardware Address"))
+
function hwaddr.cfgvalue(self, section)
local ix = self.map:get(section, "ifname") or ""
+ ix = (type(ix) == "table") and ix[1] or ix
+
local mac = fs.readfile("/sys/class/net/" .. ix .. "/address")
if not mac then
git clone https://git.99rst.org/PROJECT