libs/core: more fixes for network model
This commit is contained in:
parent
be9f5d6872
commit
2c316a6aab
1 changed files with 3 additions and 3 deletions
|
@ -773,7 +773,7 @@ function protocol.is_floating(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function protocol.is_empty(self)
|
function protocol.is_empty(self)
|
||||||
if self:is_virtual() then
|
if self:is_floating() then
|
||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
local rv = true
|
local rv = true
|
||||||
|
@ -837,12 +837,12 @@ function protocol.get_interface(self)
|
||||||
else
|
else
|
||||||
local ifn = nil
|
local ifn = nil
|
||||||
local num = { }
|
local num = { }
|
||||||
for ifn in utl.imatch(_uci_state:get("network", self.sid, "ifname")) do
|
for ifn in utl.imatch(_uci_real:get("network", self.sid, "ifname")) do
|
||||||
ifn = ifn:match("^[^:/]+")
|
ifn = ifn:match("^[^:/]+")
|
||||||
return ifn and interface(ifn, self)
|
return ifn and interface(ifn, self)
|
||||||
end
|
end
|
||||||
ifn = nil
|
ifn = nil
|
||||||
_uci_state:foreach("wireless", "wifi-iface",
|
_uci_real:foreach("wireless", "wifi-iface",
|
||||||
function(s)
|
function(s)
|
||||||
if s.device then
|
if s.device then
|
||||||
num[s.device] = num[s.device] and num[s.device] + 1 or 1
|
num[s.device] = num[s.device] and num[s.device] + 1 or 1
|
||||||
|
|
Loading…
Reference in a new issue