mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Rename zone wan and lan to zone_wan and zone_lan in fw
This commit is contained in:
parent
5bf8b9923a
commit
7c2fd8f2ad
3 changed files with 36 additions and 20 deletions
|
@ -38,10 +38,10 @@ function wizard_add()
|
|||
local gostatus = true
|
||||
|
||||
-- Force WAN zone firewall members to be a list
|
||||
local fwwan = sys.exec("uci -q get firewall.@zone[1].network")
|
||||
luci.sys.call("uci -q delete firewall.@zone[1].network")
|
||||
local fwwan = sys.exec("uci -q get firewall.zone_wan.network")
|
||||
luci.sys.call("uci -q delete firewall.zone_wan.network")
|
||||
for interface in fwwan:gmatch("%S+") do
|
||||
luci.sys.call("uci -q add_list firewall.@zone[1].network=" .. interface)
|
||||
luci.sys.call("uci -q add_list firewall.zone_wan.network=" .. interface)
|
||||
end
|
||||
ucic:save("firewall")
|
||||
|
||||
|
@ -185,7 +185,7 @@ function wizard_add()
|
|||
luci.sys.call("uci -q commit vnstat")
|
||||
|
||||
-- Dirty way to add new interface to firewall...
|
||||
luci.sys.call("uci -q add_list firewall.@zone[1].network=wan" .. i)
|
||||
luci.sys.call("uci -q add_list firewall.zone_wan.network=wan" .. i)
|
||||
luci.sys.call("uci -q commit firewall")
|
||||
|
||||
luci.sys.call("/etc/init.d/macvlan restart >/dev/null 2>/dev/null")
|
||||
|
@ -217,7 +217,7 @@ function wizard_add()
|
|||
luci.sys.call("uci -q del_list vnstat.@vnstat[-1].interface=" .. defif)
|
||||
end
|
||||
luci.sys.call("uci -q commit vnstat")
|
||||
luci.sys.call("uci -q del_list firewall.@zone[1].network=" .. intf)
|
||||
luci.sys.call("uci -q del_list firewall.zone_wan.network=" .. intf)
|
||||
luci.sys.call("uci -q commit firewall")
|
||||
gostatus = false
|
||||
end
|
||||
|
|
|
@ -372,7 +372,7 @@
|
|||
<%
|
||||
for _, iface in ipairs(net:get_networks()) do
|
||||
local ifname = iface:name()
|
||||
local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.@zone[0].network | grep " .. ifname))
|
||||
local firewall_lan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_lan.network | grep " .. ifname))
|
||||
if firewall_lan ~= "" then
|
||||
%>
|
||||
<h3><%=ifname%></h3>
|
||||
|
@ -475,7 +475,7 @@
|
|||
<%
|
||||
for _, iface in ipairs(net:get_networks()) do
|
||||
local ifname = iface:name()
|
||||
local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.@zone[1].network | grep " .. ifname))
|
||||
local firewall_wan = luci.util.trim(luci.sys.exec("uci -q get firewall.zone_wan.network | grep " .. ifname))
|
||||
if firewall_wan ~= "" then
|
||||
|
||||
-- local multipath = uci:get("network",ifname,"multipath")
|
||||
|
@ -943,9 +943,10 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="cbi-page-actions">
|
||||
<div class="cbi-page-actions control-group">
|
||||
<input type="hidden" name="token" value="<%=token%>" />
|
||||
<input class="cbi-button cbi-button-apply" type="submit" value="<%:Save & Apply%>" /> <input class="cbi-button cbi-button-reset" type="button" value="Reset" onclick="location.href='<%=url('admin/system/openmptcprouter/wizard')%>'" />
|
||||
<button class="cbi-button cbi-button-apply"><%:Save & Apply%></button>
|
||||
<button class="cbi-button cbi-button-reset"><%:Reset%></button>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">cbi_init();</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue