Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d83e177 authored by Peter Pan(潘卫平)'s avatar Peter Pan(潘卫平) Committed by David S. Miller
Browse files

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: default avatarWeiping Pan <panweiping3@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0d4eb29
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -1668,7 +1668,6 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
	}
	}
	sk_setup_caps(newsk, dst);
	sk_setup_caps(newsk, dst);


	tcp_mtup_init(newsk);
	tcp_sync_mss(newsk, dst_mtu(dst));
	tcp_sync_mss(newsk, dst_mtu(dst));
	newtp->advmss = dst_metric_advmss(dst);
	newtp->advmss = dst_metric_advmss(dst);
	if (tcp_sk(sk)->rx_opt.user_mss &&
	if (tcp_sk(sk)->rx_opt.user_mss &&
+0 −1
Original line number Original line Diff line number Diff line
@@ -1246,7 +1246,6 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
		inet_csk(newsk)->icsk_ext_hdr_len = (newnp->opt->opt_nflen +
		inet_csk(newsk)->icsk_ext_hdr_len = (newnp->opt->opt_nflen +
						     newnp->opt->opt_flen);
						     newnp->opt->opt_flen);


	tcp_mtup_init(newsk);
	tcp_sync_mss(newsk, dst_mtu(dst));
	tcp_sync_mss(newsk, dst_mtu(dst));
	newtp->advmss = dst_metric_advmss(dst);
	newtp->advmss = dst_metric_advmss(dst);
	if (tcp_sk(sk)->rx_opt.user_mss &&
	if (tcp_sk(sk)->rx_opt.user_mss &&