]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/ipv4/tcp_metrics.c
Merge tag 'iio-fixes-for-5.4a' of https://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / net / ipv4 / tcp_metrics.c
index b467a7cabf40e6af2ce69649f3ca48635bf06319..c4848e7a0aad123bcb6589be6247fc5007796699 100644 (file)
@@ -512,16 +512,6 @@ void tcp_init_metrics(struct sock *sk)
 
                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,