libs/core: ensure that luci.model.network.network._ip() always returns a table if a list was requested

This commit is contained in:
Jo-Philipp Wich 2011-02-20 14:42:35 +00:00
parent a9db1f2b74
commit 72fac8f90f

View 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