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 911d2a7..3c09648 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