mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Fix add interface using macvlan
This commit is contained in:
parent
34caf3ee14
commit
0a8cc8456e
1 changed files with 18 additions and 4 deletions
|
@ -390,17 +390,31 @@ end
|
||||||
<%
|
<%
|
||||||
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.*")) and device_notvirtual(ifacea) 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.*")) 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>
|
||||||
|
<%
|
||||||
|
else
|
||||||
|
%>
|
||||||
|
<option value="<%=ifacea%>"<% if uci:get("network",ifname,"masterintf") == ifacea then iffind = 1 %> selected="selected"<% end %>><%=ifacea%></option>
|
||||||
<%
|
<%
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if iffinf == 0 and uci:get("network",ifname,"ifname") ~= nil then
|
end
|
||||||
|
if uci:get("network",ifname,"proto") ~= "macvlan" then
|
||||||
|
if iffind == 0 and uci:get("network",ifname,"ifname") ~= nil then
|
||||||
%>
|
%>
|
||||||
<option value="<%=uci:get("network",ifname,"ifname")%>" selected="selected"><%=uci:get("network",ifname,"ifname")%></option>
|
<option value="<%=uci:get("network",ifname,"ifname")%>" selected="selected"><%=uci:get("network",ifname,"ifname")%></option>
|
||||||
<%
|
<%
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
if iffind == 0 and uci:get("network",ifname,"masterintf") ~= nil then
|
||||||
|
%>
|
||||||
|
<option value="<%=uci:get("network",ifname,"masterintf")%>" selected="selected"><%=uci:get("network",ifname,"masterintf")%></option>
|
||||||
|
<%
|
||||||
|
end
|
||||||
|
end
|
||||||
%>
|
%>
|
||||||
</select>
|
</select>
|
||||||
<br />
|
<br />
|
||||||
|
@ -481,7 +495,7 @@ end
|
||||||
<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.*")) and device_notvirtual(ifacea) 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.*")) 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>
|
||||||
<%
|
<%
|
||||||
|
@ -804,7 +818,7 @@ end
|
||||||
<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.*")) and device_notvirtual(ifacea) 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.*")) then
|
||||||
%>
|
%>
|
||||||
<option value="<%=ifacea%>"><%=ifacea%></option>
|
<option value="<%=ifacea%>"><%=ifacea%></option>
|
||||||
<%
|
<%
|
||||||
|
|
Loading…
Reference in a new issue