mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Fix for IPv6 in wizard
This commit is contained in:
parent
55d4722aca
commit
7d9545aa40
1 changed files with 17 additions and 1 deletions
|
@ -251,7 +251,7 @@ function wizard_add()
|
||||||
if typeintf == "macvlan" and masterintf ~= "" then
|
if typeintf == "macvlan" and masterintf ~= "" then
|
||||||
ucic:set("network",intf,"type","macvlan")
|
ucic:set("network",intf,"type","macvlan")
|
||||||
ucic:set("network",intf,"masterintf",masterintf)
|
ucic:set("network",intf,"masterintf",masterintf)
|
||||||
elseif typeintf == "" and ifname ~= "" and (proto == "static" or proto == "dhcp" ) then
|
elseif typeintf == "" and ifname ~= "" and (proto == "static" or proto == "dhcp" or proto == "dhcpv6") then
|
||||||
ucic:set("network",intf,"ifname",ifname)
|
ucic:set("network",intf,"ifname",ifname)
|
||||||
elseif typeintf == "" and device ~= "" and proto == "ncm" then
|
elseif typeintf == "" and device ~= "" and proto == "ncm" then
|
||||||
ucic:set("network",intf,"device",device_ncm)
|
ucic:set("network",intf,"device",device_ncm)
|
||||||
|
@ -296,6 +296,11 @@ function wizard_add()
|
||||||
ucic:set("network",intf,"ip6gw","")
|
ucic:set("network",intf,"ip6gw","")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if proto == "dhcpv6" then
|
||||||
|
ucic:set("network",intf,"reqaddress","try")
|
||||||
|
ucic:set("network",intf,"reqprefix","auto")
|
||||||
|
end
|
||||||
|
|
||||||
ucic:delete("openmptcprouter",intf,"lc")
|
ucic:delete("openmptcprouter",intf,"lc")
|
||||||
ucic:save("openmptcprouter")
|
ucic:save("openmptcprouter")
|
||||||
|
|
||||||
|
@ -437,6 +442,11 @@ function wizard_add()
|
||||||
table.insert(aserverips,ip)
|
table.insert(aserverips,ip)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if disableipv6 == "1" then
|
||||||
|
if table.getn(aserverips) == 2 then
|
||||||
|
table.remove(aserverips, 2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local master = luci.http.formvalue("master") or ""
|
local master = luci.http.formvalue("master") or ""
|
||||||
|
|
||||||
|
@ -548,6 +558,9 @@ function wizard_add()
|
||||||
if default_proxy == "shadowsocks" and serversnb > disablednb then
|
if default_proxy == "shadowsocks" and serversnb > disablednb then
|
||||||
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
||||||
end
|
end
|
||||||
|
if disableipv6 == "1" and nbip > 0 then
|
||||||
|
break
|
||||||
|
end
|
||||||
nbip = nbip + 1
|
nbip = nbip + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -579,6 +592,9 @@ function wizard_add()
|
||||||
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
||||||
end
|
end
|
||||||
nbip = nbip + 1
|
nbip = nbip + 1
|
||||||
|
if disableipv6 == "1" and nbip > 0 then
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue