]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
net: remove wrong initialization for snd_wl1
authorRazvan Ghitulete <rghitulete@ixiacom.com>
Tue, 14 Aug 2012 13:30:20 +0000 (16:30 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Aug 2012 22:23:46 +0000 (15:23 -0700)
The field tp->snd_wl1 is twice initialized, the second time
seems to be wrong as it may overwrite any update in tcp_ack.

Signed-off-by: Razvan Ghitulete <rghitulete@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c

index fa2c2c2cac2d1a81557be468cf799fee5db7e49c..c423317eb719b85a05a6411d14bb69a57ff81d38 100644 (file)
@@ -5744,7 +5744,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
 
                TCP_ECN_rcv_synack(tp, th);
 
-               tp->snd_wl1 = TCP_SKB_CB(skb)->seq;
+               tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
                tcp_ack(sk, skb, FLAG_SLOWPATH);
 
                /* Ok.. it's good. Set up sequence numbers and
@@ -5757,7 +5757,6 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
                 * never scaled.
                 */
                tp->snd_wnd = ntohs(th->window);
-               tcp_init_wl(tp, TCP_SKB_CB(skb)->seq);
 
                if (!tp->rx_opt.wscale_ok) {
                        tp->rx_opt.snd_wscale = tp->rx_opt.rcv_wscale = 0;