libs/core: ensure that luci.model.network.network._ip() always returns a table if...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 20 Feb 2011 14:42:35 +0000 (14:42 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 20 Feb 2011 14:42:35 +0000 (14:42 +0000)
libs/core/luasrc/model/network.lua

index 911d2a7fc5ccf13a70bcdacc4d5e1fd44f40ecdb..3c0964841a7545daaf3e8b9aedb69a7324c27764 100644 (file)
@@ -478,7 +478,7 @@ end
 function network._ip(self, opt, family, list)
        local ip = uci_s:get("network", self.sid, opt)
        local fc = (family == 6) and ipc.IPv6 or ipc.IPv4
-       if ip then
+       if ip or list then
                if list then
                        local l = { }
                        for ip in utl.imatch(ip) do