mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Only display real interface in wizard
This commit is contained in:
parent
abaadfdc6b
commit
28b13c78e9
1 changed files with 5 additions and 4 deletions
|
@ -14,7 +14,8 @@
|
||||||
local ifacename = uci:get("network",ifacen,"ifname")
|
local ifacename = uci:get("network",ifacen,"ifname")
|
||||||
local ifacetype = uci:get("network",ifacen,"type") or ""
|
local ifacetype = uci:get("network",ifacen,"type") or ""
|
||||||
local ifaceproto = uci:get("network",ifacen,"proto") or ""
|
local ifaceproto = uci:get("network",ifacen,"proto") or ""
|
||||||
if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then
|
--if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then
|
||||||
|
if ifacename == dev and (ifacetype == "macvlan" or ifaceproto == "6in4") then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -380,7 +381,7 @@
|
||||||
<%
|
<%
|
||||||
iffind=0
|
iffind=0
|
||||||
for _, ifacea in ipairs(ifaces) do
|
for _, ifacea in ipairs(ifaces) do
|
||||||
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) then
|
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then
|
||||||
if uci:get("network",ifname,"proto") ~= "macvlan" then
|
if uci:get("network",ifname,"proto") ~= "macvlan" then
|
||||||
%>
|
%>
|
||||||
<option value="<%=ifacea%>"<% if uci:get("network",ifname,"ifname") == ifacea then iffind = 1 %> selected="selected"<% end %>><%=ifacea%></option>
|
<option value="<%=ifacea%>"<% if uci:get("network",ifname,"ifname") == ifacea then iffind = 1 %> selected="selected"<% end %>><%=ifacea%></option>
|
||||||
|
@ -485,7 +486,7 @@
|
||||||
<select class="cbi-input-select" data-update="change" id="cbid.network.<%=ifname%>.masterintf" name="cbid.network.<%=ifname%>.masterintf" size="1">
|
<select class="cbi-input-select" data-update="change" id="cbid.network.<%=ifname%>.masterintf" name="cbid.network.<%=ifname%>.masterintf" size="1">
|
||||||
<%
|
<%
|
||||||
for _, ifacea in ipairs(ifaces) do
|
for _, ifacea in ipairs(ifaces) do
|
||||||
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) then
|
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then
|
||||||
%>
|
%>
|
||||||
<option value="<%=ifacea%>"<% if uci:get("network",ifname,"masterintf") == ifacea then %> selected="selected"<% end %>><%=ifacea%></option>
|
<option value="<%=ifacea%>"<% if uci:get("network",ifname,"masterintf") == ifacea then %> selected="selected"<% end %>><%=ifacea%></option>
|
||||||
<%
|
<%
|
||||||
|
@ -808,7 +809,7 @@
|
||||||
<select class="cbi-section-create-name" name="add_interface_ifname">
|
<select class="cbi-section-create-name" name="add_interface_ifname">
|
||||||
<%
|
<%
|
||||||
for _, ifacea in ipairs(ifaces) do
|
for _, ifacea in ipairs(ifaces) do
|
||||||
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*")) then
|
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*")) and device_notvirtual(ifacea) then
|
||||||
%>
|
%>
|
||||||
<option value="<%=ifacea%>"><%=ifacea%></option>
|
<option value="<%=ifacea%>"><%=ifacea%></option>
|
||||||
<%
|
<%
|
||||||
|
|
Loading…
Reference in a new issue