mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +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
|
||||
ucic:set("network",intf,"type","macvlan")
|
||||
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)
|
||||
elseif typeintf == "" and device ~= "" and proto == "ncm" then
|
||||
ucic:set("network",intf,"device",device_ncm)
|
||||
|
@ -295,6 +295,11 @@ function wizard_add()
|
|||
ucic:set("network",intf,"ip6addr","")
|
||||
ucic:set("network",intf,"ip6gw","")
|
||||
end
|
||||
|
||||
if proto == "dhcpv6" then
|
||||
ucic:set("network",intf,"reqaddress","try")
|
||||
ucic:set("network",intf,"reqprefix","auto")
|
||||
end
|
||||
|
||||
ucic:delete("openmptcprouter",intf,"lc")
|
||||
ucic:save("openmptcprouter")
|
||||
|
@ -437,6 +442,11 @@ function wizard_add()
|
|||
table.insert(aserverips,ip)
|
||||
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 ""
|
||||
|
||||
|
@ -548,6 +558,9 @@ function wizard_add()
|
|||
if default_proxy == "shadowsocks" and serversnb > disablednb then
|
||||
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
||||
end
|
||||
if disableipv6 == "1" and nbip > 0 then
|
||||
break
|
||||
end
|
||||
nbip = nbip + 1
|
||||
end
|
||||
end
|
||||
|
@ -579,6 +592,9 @@ function wizard_add()
|
|||
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
|
||||
end
|
||||
nbip = nbip + 1
|
||||
if disableipv6 == "1" and nbip > 0 then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue