Re: 2.1.97: Socket hangs in SYN_SENT [with correct patch]

David S. Miller (davem@dm.cobaltmicro.com)
Wed, 22 Apr 1998 21:31:43 -0700


From: Andi Kleen <ak@muc.de>
Date: 22 Apr 1998 12:25:07 +0200

Of course this patch was wrong, here is a corrected patch:

--- net/ipv4/tcp_output.c-o Wed Apr 22 13:02:54 1998
+++ net/ipv4/tcp_output.c Wed Apr 22 13:25:16 1998
@@ -864,6 +864,7 @@

tp->rto = dst->rtt;
tcp_init_xmit_timers(sk);
+ tcp_reset_xmit_timer(sk, TIME_RETRANS, tp->rto);
tp->retransmits = 0;
tp->fackets_out = 0;
tp->retrans_out = 0;

Andi, the patch is still wrong, look a few lines down, the code with
your patch now looks like:

tp->rto = dst->rtt;
tcp_init_xmit_timers(sk);
tcp_reset_xmit_timer(sk, TIME_RETRANS, tp->rto);
tp->retransmits = 0;
tp->fackets_out = 0;
tp->retrans_out = 0;

/* Send it off. */
__skb_queue_tail(&sk->write_queue, buff);
TCP_SKB_CB(buff)->when = jiffies;
tp->packets_out++;
tcp_transmit_skb(sk, skb_clone(buff, GFP_KERNEL));
tcp_statistics.TcpActiveOpens++;

/* Timer for repeating the SYN until an answer. */
tcp_reset_xmit_timer(sk, TIME_RETRANS, tp->rto);

The RETRANS timer is now being set twice, tp->rto can't change in that
code stream, so how in the world can this possibly fix the bug in
question, or any bug for that matter?

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu