mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Try to fix IPv6 disabling
This commit is contained in:
parent
08bdf596f2
commit
f9f3466bff
2 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue