diff options
author | Peter Pan(潘卫平) <panweiping3@gmail.com> | 2014-01-19 07:44:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-21 19:52:31 -0500 |
commit | 4d83e1773031c2b7bbcfeb3736ad20980785dd93 (patch) | |
tree | 1e2fd79836a09a54eca16dfb1872968f98034878 /net | |
parent | f0d4eb29d18f732ed80cea4bf0f6bbee9c03ed62 (diff) |
tcp: delete redundant calls of tcp_mtup_init()
As tcp_rcv_state_process() has already calls tcp_mtup_init() for non-fastopen
sock, we can delete the redundant calls of tcp_mtup_init() in
tcp_{v4,v6}_syn_recv_sock().
Signed-off-by: Weiping Pan <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 1 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 7297b56c28c7..3cf976510497 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1668,7 +1668,6 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1668 | } | 1668 | } |
1669 | sk_setup_caps(newsk, dst); | 1669 | sk_setup_caps(newsk, dst); |
1670 | 1670 | ||
1671 | tcp_mtup_init(newsk); | ||
1672 | tcp_sync_mss(newsk, dst_mtu(dst)); | 1671 | tcp_sync_mss(newsk, dst_mtu(dst)); |
1673 | newtp->advmss = dst_metric_advmss(dst); | 1672 | newtp->advmss = dst_metric_advmss(dst); |
1674 | if (tcp_sk(sk)->rx_opt.user_mss && | 1673 | if (tcp_sk(sk)->rx_opt.user_mss && |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index b61fa8bac3bd..889079b2ea85 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1246,7 +1246,6 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1246 | inet_csk(newsk)->icsk_ext_hdr_len = (newnp->opt->opt_nflen + | 1246 | inet_csk(newsk)->icsk_ext_hdr_len = (newnp->opt->opt_nflen + |
1247 | newnp->opt->opt_flen); | 1247 | newnp->opt->opt_flen); |
1248 | 1248 | ||
1249 | tcp_mtup_init(newsk); | ||
1250 | tcp_sync_mss(newsk, dst_mtu(dst)); | 1249 | tcp_sync_mss(newsk, dst_mtu(dst)); |
1251 | newtp->advmss = dst_metric_advmss(dst); | 1250 | newtp->advmss = dst_metric_advmss(dst); |
1252 | if (tcp_sk(sk)->rx_opt.user_mss && | 1251 | if (tcp_sk(sk)->rx_opt.user_mss && |