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

Fix IPv6 enable

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-10-04 21:30:57 +02:00
parent a28b5b347d
commit e9556c107c
3 changed files with 7 additions and 2 deletions

View file

@ -611,7 +611,7 @@ function settings_add()
-- Disable IPv6 -- Disable IPv6
local disable_ipv6 = luci.http.formvalue("enableipv6") or "1" local disable_ipv6 = luci.http.formvalue("enableipv6") or "1"
local dump = require("luci.util").ubus("openmptcprouter", "disableipv6", { disable_ipv6 = disable_ipv6}) local dump = require("luci.util").ubus("openmptcprouter", "disableipv6", { disable_ipv6 = tonumber(disable_ipv6)})
-- Enable/disable external check -- Enable/disable external check
local externalcheck = luci.http.formvalue("externalcheck") or "1" local externalcheck = luci.http.formvalue("externalcheck") or "1"

View file

@ -170,6 +170,7 @@ end
<% else %> <% else %>
<%:There is no Advanced Encryption Standard (AES) instruction set integrated in the processor, you should use chacha20.%> <%:There is no Advanced Encryption Standard (AES) instruction set integrated in the processor, you should use chacha20.%>
<% end %> <% end %>
<%:Encryption method is also used for Glorytun.%>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1197,6 +1197,7 @@ function set_ipv6_state(disable_ipv6)
-- Disable/Enable IPv6 in OpenMPTCProuter settings -- Disable/Enable IPv6 in OpenMPTCProuter settings
ucic:set("openmptcprouter","settings","disable_ipv6",disable_ipv6) ucic:set("openmptcprouter","settings","disable_ipv6",disable_ipv6)
ucic:save("openmptcprouter")
ucic:commit("openmptcprouter") ucic:commit("openmptcprouter")
-- Disable/Enable route announce of IPv6 -- Disable/Enable route announce of IPv6
@ -1229,8 +1230,11 @@ function set_ipv6_state(disable_ipv6)
ucic:set("dhcp","lan","ra_management","1") ucic:set("dhcp","lan","ra_management","1")
ucic:set("shadowsocks-libev","hi","local_address","::") ucic:set("shadowsocks-libev","hi","local_address","::")
end end
ucic:save("shadowsocks-libev")
ucic:commit("shadowsocks-libev")
ucic:save("dhcp") ucic:save("dhcp")
ucic:commit("dhcp") ucic:commit("dhcp")
luci.sys.exec("/etc/init.d/omr-6in4 restart >/dev/null 2>&1")
--if disable_ipv6 == "1" then --if disable_ipv6 == "1" then
-- luci.sys.exec("/etc/init.d/odhcpd stop >/dev/null 2>&1") -- luci.sys.exec("/etc/init.d/odhcpd stop >/dev/null 2>&1")
-- luci.sys.exec("/etc/init.d/odhcpd disable >/dev/null 2>&1") -- luci.sys.exec("/etc/init.d/odhcpd disable >/dev/null 2>&1")
@ -1290,7 +1294,7 @@ local methods = {
disableipv6 = { disableipv6 = {
args = { disable_ipv6 = 0 }, args = { disable_ipv6 = 0 },
call = function(args) call = function(args)
disableipv6(args.disable_ipv6) set_ipv6_disable(args.disable_ipv6)
end end
}, },
externalcheck = { externalcheck = {