projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0364054
)
libs/core: return ordered list in luci.model.network.get_interfaces()
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 31 Oct 2010 22:38:07 +0000
(22:38 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 31 Oct 2010 22:38:07 +0000
(22:38 +0000)
libs/core/luasrc/model/network.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/model/network.lua
b/libs/core/luasrc/model/network.lua
index
54008b5
..
7ef31b8
100644
(file)
--- a/
libs/core/luasrc/model/network.lua
+++ b/
libs/core/luasrc/model/network.lua
@@
-373,6
+373,7
@@
function get_interfaces(self)
local iface
local ifaces = { }
local seen = { }
local iface
local ifaces = { }
local seen = { }
+ local nfs = { }
-- find normal interfaces
uci_r:foreach("network", "interface",
-- find normal interfaces
uci_r:foreach("network", "interface",
@@
-380,17
+381,21
@@
function get_interfaces(self)
for iface in utl.imatch(s.ifname) do
if not _iface_ignore(iface) and not _wifi_iface(iface) then
seen[iface] = true
for iface in utl.imatch(s.ifname) do
if not _iface_ignore(iface) and not _wifi_iface(iface) then
seen[iface] = true
-
ifaces[#ifaces+1
] = interface(iface)
+
nfs[iface
] = interface(iface)
end
end
end)
for iface in utl.kspairs(ifs) do
if not (seen[iface] or _iface_ignore(iface) or _wifi_iface(iface)) then
end
end
end)
for iface in utl.kspairs(ifs) do
if not (seen[iface] or _iface_ignore(iface) or _wifi_iface(iface)) then
-
ifaces[#ifaces+1
] = interface(iface)
+
nfs[iface
] = interface(iface)
end
end
end
end
+ for iface in utl.kspairs(nfs) do
+ ifaces[#ifaces+1] = nfs[iface]
+ end
+
-- find wifi interfaces
local num = { }
local wfs = { }
-- find wifi interfaces
local num = { }
local wfs = { }