diff options
author | Jo-Philipp Wich <jo@mein.io> | 2016-04-26 20:54:52 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-04-26 21:01:18 +0200 |
commit | 4983a9b034ac3f7c9f4f228110e622d900d6198d (patch) | |
tree | 4119e48e4f2a87b48ee52ae0a8c7d416cb3846bd /modules/luci-base/luasrc | |
parent | 91511033564929af41fa1f57bccde7fbcb7f5620 (diff) |
luci-base: fix luci.model.network.ignore_interface()
Fix the underlying _iface_ignore() function to not ignore virtual interfaces,
in order to let ignore_interface() return true for PPP and similar devices.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r-- | modules/luci-base/luasrc/model/network.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua index 741daa481..880fac59e 100644 --- a/modules/luci-base/luasrc/model/network.lua +++ b/modules/luci-base/luasrc/model/network.lua @@ -190,7 +190,7 @@ function _iface_ignore(x) return true end end - return _iface_virtual(x) + return false end @@ -216,7 +216,7 @@ function init(cursor) _tunnel[name] = true end - if _tunnel[name] or not _iface_ignore(name) then + if _tunnel[name] or not (_iface_ignore(name) or _iface_virtual(name)) then _interfaces[name] = _interfaces[name] or { idx = i.ifindex or n, name = name, @@ -500,7 +500,7 @@ function get_interfaces(self) _uci:foreach("network", "interface", function(s) for iface in utl.imatch(s.ifname) do - if not _iface_ignore(iface) and not _wifi_iface(iface) then + if not _iface_ignore(iface) and not _iface_virtual(iface) and not _wifi_iface(iface) then seen[iface] = true nfs[iface] = interface(iface) end @@ -508,7 +508,7 @@ function get_interfaces(self) end) for iface in utl.kspairs(_interfaces) do - if not (seen[iface] or _iface_ignore(iface) or _wifi_iface(iface)) then + if not (seen[iface] or (_iface_ignore(iface) or _iface_virtual(iface) or _wifi_iface(iface)) then nfs[iface] = interface(iface) end end |