diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-27 16:48:46 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-27 16:48:46 +0000 |
commit | a27c539deac41b583434564fbd0c2f8c5317b0f9 (patch) | |
tree | aa17944630bc944e744c608acde64391878c7fb0 /modules/admin-core | |
parent | db087ebfb40dea62f24c4c9e9347e28030358f9d (diff) |
modules/admin-core: prevent crash in network interface overview when netmask option is defined, but empty
Diffstat (limited to 'modules/admin-core')
-rw-r--r-- | modules/admin-core/luasrc/tools/webadmin.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/admin-core/luasrc/tools/webadmin.lua b/modules/admin-core/luasrc/tools/webadmin.lua index f7eddd800..62168ebb7 100644 --- a/modules/admin-core/luasrc/tools/webadmin.lua +++ b/modules/admin-core/luasrc/tools/webadmin.lua @@ -66,7 +66,7 @@ function network_get_addresses(net) local mav4 = state:get("network", net, "netmask") local ipv6 = state:get("network", net, "ip6addr") - if ipv4 and mav4 then + if ipv4 and mav4 and #ipv4 > 0 and #mav4 > 0 then ipv4 = luci.ip.IPv4(ipv4, mav4) if ipv4 then @@ -168,4 +168,4 @@ function iface_get_network(iface) ) return net -end
\ No newline at end of file +end |