1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge branch 'test' into develop

This commit is contained in:
suyuan 2021-02-13 23:53:07 +08:00
commit 6c9779312e
15 changed files with 325 additions and 116 deletions

View file

@ -36,6 +36,15 @@ end
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")
for interface in fwwan:gmatch("%S+") do
luci.sys.call("uci -q add_list firewall.@zone[1].network=" .. interface)
end
ucic:save("firewall")
-- Add new server
local add_server = luci.http.formvalue("add_server") or ""
local add_server_name = luci.http.formvalue("add_server_name") or ""
@ -190,7 +199,9 @@ function wizard_add()
for intf, _ in pairs(delete_intf) do
local defif = ucic:get("network",intf,"ifname")
ucic:delete("network",intf)
ucic:delete("network",intf .. "_dev")
if ucic:get("network",intf .. "_dev") ~= "" then
ucic:delete("network",intf .. "_dev")
end
ucic:save("network")
ucic:commit("network")
ucic:delete("sqm",intf)
@ -298,7 +309,9 @@ function wizard_add()
if proto == "dhcpv6" then
ucic:set("network",intf,"reqaddress","try")
ucic:set("network",intf,"reqprefix","auto")
ucic:set("network",intf,"reqprefix","no")
ucic:set("network",intf,"iface_map","0")
ucic:set("network",intf,"ipv6","1")
end
ucic:delete("openmptcprouter",intf,"lc")