Hello,
I've checked the source to solve some problems and I just realize
retransmission of "SYN+ACK" does'nt work well on linux v2.2.14.
Tere are two problems.
1) tcp_check_req() stops the "slow timer for SYN-RECV sockets"
-- tcp_syn_recv_timer() -- even if it ignores to make
the TCP connection ESTABLISHED (the queue limit of pending
connections might be over).
"SYN+ACK packet" must be retranmitted again after a while.
2) tcp_close_pending() may over-decrease the counter of
the "slow timer for SYN-RECV sockets"
(tcp_slt_array[TCP_SLT_SYNACK].count).
Open_requests on the syn_wait_queue might be in
ESTABLISHES status already.
We can only call tcp_dec_slow_timer(TCP_SLT_SYNACK) for
Not-ESTABLISHED connections.
(Also ack_backlog count may be over-decreased.)
Here is a patch to fix them.
--- linux-2.2.14/net/ipv4/tcp.c Sun Apr 16 04:35:21 2000
+++ linux/net/ipv4/tcp.c Sun Apr 16 04:40:44 2000
@@ -1484,15 +1484,18 @@
while(req) {
struct open_request *iter;
- if (req->sk)
- tcp_close(req->sk, 0);
-
iter = req;
req = req->dl_next;
+ if (iter->sk) {
+ tcp_close(iter->sk, 0);
+ sk->ack_backlog--;
+ } else {
+ tcp_dec_slow_timer(TCP_SLT_SYNACK);
+ sk->tp_pinfo.af_tcp.syn_backlog--;
+ }
(*iter->class->destructor)(iter);
- tcp_dec_slow_timer(TCP_SLT_SYNACK);
- sk->ack_backlog--;
+
tcp_openreq_free(iter);
}
--- linux-2.2.14/net/ipv4/tcp_input.c Sun Apr 16 04:35:21 2000
+++ linux/net/ipv4/tcp_input.c Sun Apr 16 04:40:44 2000
@@ -2012,10 +2012,10 @@
}
sk = tp->af_specific->syn_recv_sock(sk, skb, req, NULL);
- tcp_dec_slow_timer(TCP_SLT_SYNACK);
if (sk == NULL)
return NULL;
+ tcp_dec_slow_timer(TCP_SLT_SYNACK);
req->expires = 0UL;
req->sk = sk;
}
Waiting for your comments.
Regards,
Hirokazu Takahashi
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]