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:
parent
18d4ac663d
commit
e3b354b56e
3 changed files with 13 additions and 1 deletions
|
@ -290,6 +290,11 @@ function settings_add()
|
||||||
local tcp_keepalive_time = luci.http.formvalue("tcp_keepalive_time")
|
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("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)
|
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
|
-- Disable IPv6
|
||||||
local disable_ipv6 = luci.http.formvalue("disable_ipv6") or 0
|
local disable_ipv6 = luci.http.formvalue("disable_ipv6") or 0
|
||||||
|
|
|
@ -13,6 +13,12 @@
|
||||||
<input type="text" name="tcp_keepalive_time" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_keepalive_time")):match(" %d+"))%>">
|
<input type="text" name="tcp_keepalive_time" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_keepalive_time")):match(" %d+"))%>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="cbi-value">
|
||||||
|
<label class="cbi-value-title"><%:IPv4 TCP FIN timeout%></label>
|
||||||
|
<div class="cbi-value-field">
|
||||||
|
<input type="text" name="tcp_fin_timeout" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("sysctl net.ipv4.tcp_fin_timeout")):match(" %d+"))%>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Disable IPv6%></label>
|
<label class="cbi-value-title"><%:Disable IPv6%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
net.ipv4.tcp_keepalive_time=7200
|
net.ipv4.tcp_keepalive_time=7200
|
||||||
net.ipv6.conf.all.disable_ipv6=0
|
net.ipv6.conf.all.disable_ipv6=0
|
||||||
|
net.ipv4.tcp_fin_timeout=20
|
Loading…
Add table
Add a link
Reference in a new issue