summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
commit545f435ebcfd94a1e7c20b46efe81b4d6ac4e698 (patch)
treee9ce4bc598d06374bda906f18365984bf22a526a /net/ipv4/tcp_timer.c
parent4291a610eef89d0d5c69d9a10ee6560e1aa36c74 (diff)
Merge with Linux 2.1.55. More bugfixes and goodies from my private
CVS archive.
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index b4810e784..cf6fcfbe7 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -447,6 +447,7 @@ static void tcp_syn_recv_timer(unsigned long data)
/* TCP_LISTEN is implied. */
if (!sk->sock_readers && tp->syn_wait_queue) {
+ struct open_request *prev = (struct open_request *)(&tp->syn_wait_queue);
struct open_request *req = tp->syn_wait_queue;
do {
struct open_request *conn;
@@ -454,13 +455,15 @@ static void tcp_syn_recv_timer(unsigned long data)
conn = req;
req = req->dl_next;
- if (conn->sk)
- continue;
+ if (conn->sk) {
+ prev = conn;
+ continue;
+ }
if ((long)(now - conn->expires) <= 0)
break;
- tcp_synq_unlink(tp, conn);
+ tcp_synq_unlink(tp, conn, prev);
if (conn->retrans >= sysctl_tcp_retries1) {
#ifdef TCP_DEBUG
printk(KERN_DEBUG "syn_recv: "
@@ -475,6 +478,7 @@ static void tcp_syn_recv_timer(unsigned long data)
break;
} else {
__u32 timeo;
+ struct open_request *op;
(*conn->class->rtx_syn_ack)(sk, conn);
@@ -487,8 +491,12 @@ static void tcp_syn_recv_timer(unsigned long data)
<< conn->retrans),
120*HZ);
conn->expires = now + timeo;
+ op = prev->dl_next;
tcp_synq_queue(tp, conn);
+ if (op != prev->dl_next)
+ prev = prev->dl_next;
}
+ /* old prev still valid here */
} while (req);
}
sk = sk->next;