diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 859252e71..bc7b55188 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -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