aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/tcp.h4
-rw-r--r--net/ipv4/tcp_input.c9
-rw-r--r--net/ipv4/tcp_minisocks.c2
-rw-r--r--net/ipv4/tcp_output.c2
4 files changed, 8 insertions, 9 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 055e4946d4c8..d74ac301e6bc 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -825,12 +825,12 @@ static inline void tcp_push_pending_frames(struct sock *sk)
825 __tcp_push_pending_frames(sk, tcp_current_mss(sk, 1), tp->nonagle); 825 __tcp_push_pending_frames(sk, tcp_current_mss(sk, 1), tp->nonagle);
826} 826}
827 827
828static inline void tcp_init_wl(struct tcp_sock *tp, u32 ack, u32 seq) 828static inline void tcp_init_wl(struct tcp_sock *tp, u32 seq)
829{ 829{
830 tp->snd_wl1 = seq; 830 tp->snd_wl1 = seq;
831} 831}
832 832
833static inline void tcp_update_wl(struct tcp_sock *tp, u32 ack, u32 seq) 833static inline void tcp_update_wl(struct tcp_sock *tp, u32 seq)
834{ 834{
835 tp->snd_wl1 = seq; 835 tp->snd_wl1 = seq;
836} 836}
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index e4442a293eb0..5ecd7aa25979 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3416,7 +3416,7 @@ static int tcp_ack_update_window(struct sock *sk, struct sk_buff *skb, u32 ack,
3416 3416
3417 if (tcp_may_update_window(tp, ack, ack_seq, nwin)) { 3417 if (tcp_may_update_window(tp, ack, ack_seq, nwin)) {
3418 flag |= FLAG_WIN_UPDATE; 3418 flag |= FLAG_WIN_UPDATE;
3419 tcp_update_wl(tp, ack, ack_seq); 3419 tcp_update_wl(tp, ack_seq);
3420 3420
3421 if (tp->snd_wnd != nwin) { 3421 if (tp->snd_wnd != nwin) {
3422 tp->snd_wnd = nwin; 3422 tp->snd_wnd = nwin;
@@ -3621,7 +3621,7 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
3621 * No more checks are required. 3621 * No more checks are required.
3622 * Note, we use the fact that SND.UNA>=SND.WL2. 3622 * Note, we use the fact that SND.UNA>=SND.WL2.
3623 */ 3623 */
3624 tcp_update_wl(tp, ack, ack_seq); 3624 tcp_update_wl(tp, ack_seq);
3625 tp->snd_una = ack; 3625 tp->snd_una = ack;
3626 flag |= FLAG_WIN_UPDATE; 3626 flag |= FLAG_WIN_UPDATE;
3627 3627
@@ -5418,7 +5418,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
5418 * never scaled. 5418 * never scaled.
5419 */ 5419 */
5420 tp->snd_wnd = ntohs(th->window); 5420 tp->snd_wnd = ntohs(th->window);
5421 tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(skb)->seq); 5421 tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
5422 5422
5423 if (!tp->rx_opt.wscale_ok) { 5423 if (!tp->rx_opt.wscale_ok) {
5424 tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0; 5424 tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0;
@@ -5679,8 +5679,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
5679 tp->snd_una = TCP_SKB_CB(skb)->ack_seq; 5679 tp->snd_una = TCP_SKB_CB(skb)->ack_seq;
5680 tp->snd_wnd = ntohs(th->window) << 5680 tp->snd_wnd = ntohs(th->window) <<
5681 tp->rx_opt.snd_wscale; 5681 tp->rx_opt.snd_wscale;
5682 tcp_init_wl(tp, TCP_SKB_CB(skb)->ack_seq, 5682 tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
5683 TCP_SKB_CB(skb)->seq);
5684 5683
5685 /* tcp_ack considers this ACK as duplicate 5684 /* tcp_ack considers this ACK as duplicate
5686 * and does not calculate rtt. 5685 * and does not calculate rtt.
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index bb3d8b35f19a..4b0df3e6b609 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -399,7 +399,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req,
399 399
400 tcp_prequeue_init(newtp); 400 tcp_prequeue_init(newtp);
401 401
402 tcp_init_wl(newtp, treq->snt_isn, treq->rcv_isn); 402 tcp_init_wl(newtp, treq->rcv_isn);
403 403
404 newtp->srtt = 0; 404 newtp->srtt = 0;
405 newtp->mdev = TCP_TIMEOUT_INIT; 405 newtp->mdev = TCP_TIMEOUT_INIT;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 920c57b90ded..eb285befdf3b 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2337,7 +2337,7 @@ static void tcp_connect_init(struct sock *sk)
2337 sk->sk_err = 0; 2337 sk->sk_err = 0;
2338 sock_reset_flag(sk, SOCK_DONE); 2338 sock_reset_flag(sk, SOCK_DONE);
2339 tp->snd_wnd = 0; 2339 tp->snd_wnd = 0;
2340 tcp_init_wl(tp, tp->write_seq, 0); 2340 tcp_init_wl(tp, 0);
2341 tp->snd_una = tp->write_seq; 2341 tp->snd_una = tp->write_seq;
2342 tp->snd_sml = tp->write_seq; 2342 tp->snd_sml = tp->write_seq;
2343 tp->snd_up = tp->write_seq; 2343 tp->snd_up = tp->write_seq;