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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 1079e6ad77fe..41828bdc5d32 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -381,18 +381,18 @@ void tcp_openreq_init_rwin(struct request_sock *req,
381 381
382 window_clamp = READ_ONCE(tp->window_clamp); 382 window_clamp = READ_ONCE(tp->window_clamp);
383 /* Set this up on the first call only */ 383 /* Set this up on the first call only */
384 req->window_clamp = window_clamp ? : dst_metric(dst, RTAX_WINDOW); 384 req->rsk_window_clamp = window_clamp ? : dst_metric(dst, RTAX_WINDOW);
385 385
386 /* limit the window selection if the user enforce a smaller rx buffer */ 386 /* limit the window selection if the user enforce a smaller rx buffer */
387 if (sk_listener->sk_userlocks & SOCK_RCVBUF_LOCK && 387 if (sk_listener->sk_userlocks & SOCK_RCVBUF_LOCK &&
388 (req->window_clamp > full_space || req->window_clamp == 0)) 388 (req->rsk_window_clamp > full_space || req->rsk_window_clamp == 0))
389 req->window_clamp = full_space; 389 req->rsk_window_clamp = full_space;
390 390
391 /* tcp_full_space because it is guaranteed to be the first packet */ 391 /* tcp_full_space because it is guaranteed to be the first packet */
392 tcp_select_initial_window(full_space, 392 tcp_select_initial_window(full_space,
393 mss - (ireq->tstamp_ok ? TCPOLEN_TSTAMP_ALIGNED : 0), 393 mss - (ireq->tstamp_ok ? TCPOLEN_TSTAMP_ALIGNED : 0),
394 &req->rcv_wnd, 394 &req->rsk_rcv_wnd,
395 &req->window_clamp, 395 &req->rsk_window_clamp,
396 ireq->wscale_ok, 396 ireq->wscale_ok,
397 &rcv_wscale, 397 &rcv_wscale,
398 dst_metric(dst, RTAX_INITRWND)); 398 dst_metric(dst, RTAX_INITRWND));
@@ -512,9 +512,9 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
512 if (sysctl_tcp_fack) 512 if (sysctl_tcp_fack)
513 tcp_enable_fack(newtp); 513 tcp_enable_fack(newtp);
514 } 514 }
515 newtp->window_clamp = req->window_clamp; 515 newtp->window_clamp = req->rsk_window_clamp;
516 newtp->rcv_ssthresh = req->rcv_wnd; 516 newtp->rcv_ssthresh = req->rsk_rcv_wnd;
517 newtp->rcv_wnd = req->rcv_wnd; 517 newtp->rcv_wnd = req->rsk_rcv_wnd;
518 newtp->rx_opt.wscale_ok = ireq->wscale_ok; 518 newtp->rx_opt.wscale_ok = ireq->wscale_ok;
519 if (newtp->rx_opt.wscale_ok) { 519 if (newtp->rx_opt.wscale_ok) {
520 newtp->rx_opt.snd_wscale = ireq->snd_wscale; 520 newtp->rx_opt.snd_wscale = ireq->snd_wscale;
@@ -707,7 +707,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
707 /* RFC793: "first check sequence number". */ 707 /* RFC793: "first check sequence number". */
708 708
709 if (paws_reject || !tcp_in_window(TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq, 709 if (paws_reject || !tcp_in_window(TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
710 tcp_rsk(req)->rcv_nxt, tcp_rsk(req)->rcv_nxt + req->rcv_wnd)) { 710 tcp_rsk(req)->rcv_nxt, tcp_rsk(req)->rcv_nxt + req->rsk_rcv_wnd)) {
711 /* Out of window: send ACK and drop. */ 711 /* Out of window: send ACK and drop. */
712 if (!(flg & TCP_FLAG_RST)) 712 if (!(flg & TCP_FLAG_RST))
713 req->rsk_ops->send_ack(sk, skb, req); 713 req->rsk_ops->send_ack(sk, skb, req);