aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_minisocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r--net/ipv4/tcp_minisocks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 5401dbd39c8f..adc6ce486a38 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -462,6 +462,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
462 struct tcp_request_sock *treq = tcp_rsk(req); 462 struct tcp_request_sock *treq = tcp_rsk(req);
463 struct inet_connection_sock *newicsk; 463 struct inet_connection_sock *newicsk;
464 struct tcp_sock *oldtp, *newtp; 464 struct tcp_sock *oldtp, *newtp;
465 u32 seq;
465 466
466 if (!newsk) 467 if (!newsk)
467 return NULL; 468 return NULL;
@@ -475,8 +476,10 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
475 /* Now setup tcp_sock */ 476 /* Now setup tcp_sock */
476 newtp->pred_flags = 0; 477 newtp->pred_flags = 0;
477 478
478 newtp->rcv_wup = newtp->copied_seq = 479 seq = treq->rcv_isn + 1;
479 newtp->rcv_nxt = treq->rcv_isn + 1; 480 newtp->rcv_wup = seq;
481 newtp->copied_seq = seq;
482 WRITE_ONCE(newtp->rcv_nxt, seq);
480 newtp->segs_in = 1; 483 newtp->segs_in = 1;
481 484
482 newtp->snd_sml = newtp->snd_una = 485 newtp->snd_sml = newtp->snd_una =