+ local ifn = nil
+ local num = { }
+ for ifn in utl.imatch(uci_s:get("network", self.sid, "ifname")) do
+ ifn = ifn:match("^[^:/]+")
+ return ifn and interface(ifn, self)
+ end
+ ifn = nil
+ uci_s:foreach("wireless", "wifi-iface",
+ function(s)
+ if s.device then
+ num[s.device] = num[s.device] and num[s.device] + 1 or 1
+ if s.network == self.sid then
+ ifn = s.ifname or "%s.network%d" %{ s.device, num[s.device] }
+ return false
+ end
+ end
+ end)
+ return ifn and interface(ifn, self)
+ end
+end
+
+function network.get_interfaces(self)
+ if self:is_bridge() or (self:is_virtual() and not self:is_floating()) then
+ local ifaces = { }
+
+ local ifn