patch-2.1.11 linux/net/ipv4/tcp_timer.c
Next file: linux/net/ipv4/udp.c
Previous file: linux/net/ipv4/tcp_output.c
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
Mon Nov 18 11:10:14 1996
- Orig file:
v2.1.10/linux/net/ipv4/tcp_timer.c
- Orig date:
Tue Nov 12 15:56:16 1996
diff -u --recursive --new-file v2.1.10/linux/net/ipv4/tcp_timer.c linux/net/ipv4/tcp_timer.c
@@ -185,8 +185,9 @@
sk->err=sk->err_soft;
else
sk->err=ETIMEDOUT;
-
+#ifdef TCP_DEBUG
printk(KERN_DEBUG "syn timeout\n");
+#endif
sk->error_report(sk);
tcp_clear_xmit_timers(sk);
@@ -475,17 +476,14 @@
req = tp->syn_wait_queue;
- while (req && tp->syn_wait_queue)
- {
+ do {
struct open_request *conn;
-
+
conn = req;
req = req->dl_next;
if (conn->sk)
{
- if (req == tp->syn_wait_queue)
- break;
continue;
}
@@ -496,11 +494,16 @@
if (conn->retrans >= TCP_RETR1)
{
+#ifdef TCP_DEBUG
printk(KERN_DEBUG "syn_recv: "
"too many retransmits\n");
+#endif
(*conn->class->destructor)(conn);
tcp_dec_slow_timer(TCP_SLT_SYNACK);
kfree(conn);
+
+ if (!tp->syn_wait_queue)
+ break;
}
else
{
@@ -509,14 +512,16 @@
(*conn->class->rtx_syn_ack)(sk, conn);
conn->retrans++;
+#ifdef TCP_DEBUG
printk(KERN_DEBUG "syn_ack rtx %d\n", conn->retrans);
+#endif
timeo = min((TCP_TIMEOUT_INIT
<< conn->retrans),
120*HZ);
conn->expires = now + timeo;
tcp_synq_queue(tp, conn);
}
- }
+ } while (req != tp->syn_wait_queue);
}
sk = sk->next;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov