luci-app-mentohust: hide some known virtual interfaces

This commit is contained in:
Bard 2023-09-21 04:08:05 +08:00 committed by GitHub
parent 6138ab6635
commit bcf8805710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,11 @@ o.password = true
o.rmempty = true
o = e:option(Value, "interface", translate("Network interface"))
for t, e in ipairs(i.net.devices()) do if e ~= "lo" then o:value(e) end end
for t, e in ipairs(i.net.devices()) do
if e ~= 'lo' and not string.match(e, '^docker.*$') and not string.match(e, '^sit.*$') and not string.match(e, '^dummy.*$') and not string.match(e, '^teql.*$') and not string.match(e, '^veth.*$') and not string.match(e, '^ztly.*$') then
o:value(e)
end
end
o.rmempty = false
o = e:option(Value, "ipaddr", translate("IP address"))