1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00

Try to fix IPv6 disabling

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-09-08 00:46:18 +02:00
parent 08bdf596f2
commit f9f3466bff
2 changed files with 7 additions and 7 deletions

View file

@ -564,8 +564,8 @@ function settings_add()
local servers = luci.http.formvaluetable("server")
local redirect_ports = luci.http.formvaluetable("redirect_ports")
for server, _ in pairs(servers) do
local value = luci.http.formvalue("redirect_ports.%s" % server) or "0"
ucic:set("openmptcprouter",server,"redirect_ports",value)
local redirectports = luci.http.formvalue("redirect_ports.%s" % server) or "0"
ucic:set("openmptcprouter",server,"redirect_ports",redirectports)
end
-- Set tcp_keepalive_time

View file

@ -6,7 +6,7 @@ local sys = require "luci.sys"
local json = require("luci.json")
local fs = require("nixio.fs")
local net = require "luci.model.network".init()
local ucic = luci.model.uci.cursor()
local ucic = require "luci.model.uci".cursor()
local jsonc = require "luci.jsonc"
function interface_from_device(dev)
@ -1185,10 +1185,10 @@ end
function set_ipv6_state(disable_ipv6)
-- Disable/Enable IPv6 support
--luci.sys.exec("sysctl -qw net.ipv6.conf.all.disable_ipv6=%s" % disable_ipv6)
--luci.sys.exec("sed -i 's:^net.ipv6.conf.all.disable_ipv6=[0-9]*:net.ipv6.conf.all.disable_ipv6=%s:' /etc/sysctl.d/zzz_openmptcprouter.conf" % disable_ipv6)
luci.sys.exec("sysctl -qw net.ipv6.conf.all.disable_ipv6=0")
luci.sys.exec("sed -i 's:^net.ipv6.conf.all.disable_ipv6=[0-9]*:net.ipv6.conf.all.disable_ipv6=0:' /etc/sysctl.d/zzz_openmptcprouter.conf" % disable_ipv6)
luci.sys.exec("sysctl -qw net.ipv6.conf.all.disable_ipv6=%s" % disable_ipv6)
luci.sys.exec("sed -i 's:^net.ipv6.conf.all.disable_ipv6=[0-9]*:net.ipv6.conf.all.disable_ipv6=%s:' /etc/sysctl.d/zzz_openmptcprouter.conf" % disable_ipv6)
--luci.sys.exec("sysctl -qw net.ipv6.conf.all.disable_ipv6=" % disable_ipv6)
--luci.sys.exec("sed -i 's:^net.ipv6.conf.all.disable_ipv6=[0-9]*:net.ipv6.conf.all.disable_ipv6=0:' /etc/sysctl.d/zzz_openmptcprouter.conf" % disable_ipv6)
-- Disable/Enable IPv6 for firewall
ucic:set("firewall",ucic:get_first("firewall","defaults"),"disable_ipv6",disable_ipv6)