* [PATCH] net: remove wrong initialization for snd_wl1
@ 2012-08-14 13:30 Razvan Ghitulete
2012-08-15 22:23 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Razvan Ghitulete @ 2012-08-14 13:30 UTC (permalink / raw)
To: davem, kuznet, jmorris, yoshfuji, kaber, netdev; +Cc: dbaluta, Razvan Ghitulete
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>
---
net/ipv4/tcp_input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index fa2c2c2..c423317 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: remove wrong initialization for snd_wl1
2012-08-14 13:30 [PATCH] net: remove wrong initialization for snd_wl1 Razvan Ghitulete
@ 2012-08-15 22:23 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-08-15 22:23 UTC (permalink / raw)
To: rghitulete; +Cc: kuznet, jmorris, yoshfuji, kaber, netdev, dbaluta
From: Razvan Ghitulete <rghitulete@ixiacom.com>
Date: Tue, 14 Aug 2012 16:30:20 +0300
> 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>
I'll apply this, but it is mere redundancy.
The only thing tcp_ack() can set tp->snd_wl1 to is TCP_SKB_CB(skb)->seq
which is exactly what it is being set to here as well.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-15 22:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 13:30 [PATCH] net: remove wrong initialization for snd_wl1 Razvan Ghitulete
2012-08-15 22:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).