projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modules/admin-core: implement a more elegant solution for #46; treat empty or zero...
[project/luci.git]
/
modules
/
admin-core
/
luasrc
/
tools
/
webadmin.lua
diff --git
a/modules/admin-core/luasrc/tools/webadmin.lua
b/modules/admin-core/luasrc/tools/webadmin.lua
index
f7eddd8
..
0e09be9
100644
(file)
--- a/
modules/admin-core/luasrc/tools/webadmin.lua
+++ b/
modules/admin-core/luasrc/tools/webadmin.lua
@@
-66,7
+66,9
@@
function network_get_addresses(net)
local mav4 = state:get("network", net, "netmask")
local ipv6 = state:get("network", net, "ip6addr")
local mav4 = state:get("network", net, "netmask")
local ipv6 = state:get("network", net, "ip6addr")
- if ipv4 and mav4 then
+ if ipv4 and #ipv4 > 0 then
+ if mav4 and #mav4 == 0 then mav4 = nil end
+
ipv4 = luci.ip.IPv4(ipv4, mav4)
if ipv4 then
ipv4 = luci.ip.IPv4(ipv4, mav4)
if ipv4 then
@@
-168,4
+170,4
@@
function iface_get_network(iface)
)
return net
)
return net
-end
\ No newline at end of file
+end