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

Add tcp_fin_timeout support in openmptcprouter advanced settings

This commit is contained in:
Ycarus 2018-07-22 15:23:02 +02:00
parent 18d4ac663d
commit e3b354b56e
3 changed files with 13 additions and 1 deletions

View file

@ -290,6 +290,11 @@ function settings_add()
local tcp_keepalive_time = luci.http.formvalue("tcp_keepalive_time")
luci.sys.exec("sysctl -w net.ipv4.tcp_keepalive_time=%s" % tcp_keepalive_time)
luci.sys.exec("sed -i 's:^net.ipv4.tcp_keepalive_time=[0-9]*:net.ipv4.tcp_keepalive_time=%s:' /etc/sysctl.d/zzz_openmptcprouter.conf" % tcp_keepalive_time)
-- Set tcp_fin_timeout
local tcp_fin_timeout = luci.http.formvalue("tcp_fin_timeout")
luci.sys.exec("sysctl -w net.ipv4.tcp_fin_timeoute=%s" % tcp_fin_timeout)
luci.sys.exec("sed -i 's:^net.ipv4.tcp_fin_timeout=[0-9]*:net.ipv4.tcp_fin_timeout=%s:' /etc/sysctl.d/zzz_openmptcprouter.conf" % tcp_fin_timeout)
-- Disable IPv6
local disable_ipv6 = luci.http.formvalue("disable_ipv6") or 0