mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
tcp: add tcp_mss_clamp() helper
Small cleanup factorizing code doing the TCP_MAXSEG clamping. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ff3edc9b8e
commit
3541f9e8bd
5 changed files with 17 additions and 23 deletions
|
|
@ -1147,10 +1147,7 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *
|
|||
tcp_ca_openreq_child(newsk, dst);
|
||||
|
||||
tcp_sync_mss(newsk, dst_mtu(dst));
|
||||
newtp->advmss = dst_metric_advmss(dst);
|
||||
if (tcp_sk(sk)->rx_opt.user_mss &&
|
||||
tcp_sk(sk)->rx_opt.user_mss < newtp->advmss)
|
||||
newtp->advmss = tcp_sk(sk)->rx_opt.user_mss;
|
||||
newtp->advmss = tcp_mss_clamp(tcp_sk(sk), dst_metric_advmss(dst));
|
||||
|
||||
tcp_initialize_rcv_mss(newsk);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue