diff options
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
| -rw-r--r-- | net/ipv4/tcp_metrics.c | 17 | 
1 files changed, 4 insertions, 13 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index b467a7cabf40..c4848e7a0aad 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c @@ -512,16 +512,6 @@ reset:  		inet_csk(sk)->icsk_rto = TCP_TIMEOUT_FALLBACK;  	} -	/* Cut cwnd down to 1 per RFC5681 if SYN or SYN-ACK has been -	 * retransmitted. In light of RFC6298 more aggressive 1sec -	 * initRTO, we only reset cwnd when more than 1 SYN/SYN-ACK -	 * retransmission has occurred. -	 */ -	if (tp->total_retrans > 1) -		tp->snd_cwnd = 1; -	else -		tp->snd_cwnd = tcp_init_cwnd(tp, dst); -	tp->snd_cwnd_stamp = tcp_jiffies32;  }  bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst) @@ -658,7 +648,7 @@ static int tcp_metrics_fill_info(struct sk_buff *msg,  	{  		int n = 0; -		nest = nla_nest_start(msg, TCP_METRICS_ATTR_VALS); +		nest = nla_nest_start_noflag(msg, TCP_METRICS_ATTR_VALS);  		if (!nest)  			goto nla_put_failure;  		for (i = 0; i < TCP_METRIC_MAX_KERNEL + 1; i++) { @@ -951,14 +941,14 @@ static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info)  static const struct genl_ops tcp_metrics_nl_ops[] = {  	{  		.cmd = TCP_METRICS_CMD_GET, +		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,  		.doit = tcp_metrics_nl_cmd_get,  		.dumpit = tcp_metrics_nl_dump, -		.policy = tcp_metrics_nl_policy,  	},  	{  		.cmd = TCP_METRICS_CMD_DEL, +		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,  		.doit = tcp_metrics_nl_cmd_del, -		.policy = tcp_metrics_nl_policy,  		.flags = GENL_ADMIN_PERM,  	},  }; @@ -968,6 +958,7 @@ static struct genl_family tcp_metrics_nl_family __ro_after_init = {  	.name		= TCP_METRICS_GENL_NAME,  	.version	= TCP_METRICS_GENL_VERSION,  	.maxattr	= TCP_METRICS_ATTR_MAX, +	.policy = tcp_metrics_nl_policy,  	.netnsok	= true,  	.module		= THIS_MODULE,  	.ops		= tcp_metrics_nl_ops,  |