diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-11 01:14:11 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-11 01:14:11 +0000 |
commit | 2c316a6aabb04d319637128d1c734817e48c8308 (patch) | |
tree | 2ae7f895e32ab60611b4bc5b9e0f5e9eb48a35d6 | |
parent | be9f5d6872a936224ba7b10a7c756f151b106ec8 (diff) |
libs/core: more fixes for network model
-rw-r--r-- | libs/core/luasrc/model/network.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/core/luasrc/model/network.lua b/libs/core/luasrc/model/network.lua index 6e7a708ad..dd2bdfb90 100644 --- a/libs/core/luasrc/model/network.lua +++ b/libs/core/luasrc/model/network.lua @@ -773,7 +773,7 @@ function protocol.is_floating(self) end function protocol.is_empty(self) - if self:is_virtual() then + if self:is_floating() then return false else local rv = true @@ -837,12 +837,12 @@ function protocol.get_interface(self) else local ifn = nil 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("^[^:/]+") return ifn and interface(ifn, self) end ifn = nil - _uci_state:foreach("wireless", "wifi-iface", + _uci_real:foreach("wireless", "wifi-iface", function(s) if s.device then num[s.device] = num[s.device] and num[s.device] + 1 or 1 |