Commit f71a8f4c authored by Michal Tesar's avatar Michal Tesar Committed by Sasha Levin

sysctl net: Keep tcp_syn_retries inside the boundary

Limit the min/max value passed to the
/proc/sys/net/ipv4/tcp_syn_retries.
Signed-off-by: default avatarMichal Tesar <mtesar@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>

(cherry picked from commit 651e9271)
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent e323f565
......@@ -31,6 +31,8 @@ static int one = 1;
static int two = 2;
static int gso_max_segs = GSO_MAX_SEGS;
static int tcp_retr1_max = 255;
static int tcp_syn_retries_min = 1;
static int tcp_syn_retries_max = MAX_TCP_SYNCNT;
static int ip_local_port_range_min[] = { 1, 1 };
static int ip_local_port_range_max[] = { 65535, 65535 };
static int tcp_adv_win_scale_min = -31;
......@@ -320,7 +322,9 @@ static struct ctl_table ipv4_table[] = {
.data = &ipv4_config.no_pmtu_disc,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
.proc_handler = proc_dointvec_minmax,
.extra1 = &tcp_syn_retries_min,
.extra2 = &tcp_syn_retries_max
},
{
.procname = "ip_nonlocal_bind",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment