Hello,
I updated the patch.
Calling "(*req->class->destructor)(req)" would be better than
calling "kfree(req->af.v4_req.opt)".
>Could you verify syncookies.c as well? Looking through patch-2.3.15,
>I see that I added incrementing syn_backlog there too.
>Seems, it should be done in 2.2 as well...
Regards,
Hirokazu Takahashi
diff -u linux-2.2.14/net/ipv4/syncookies.c linux/net/ipv4/syncookies.c
--- linux-2.2.14/net/ipv4/syncookies.c Sun Apr 16 04:35:22 2000
+++ linux/net/ipv4/syncookies.c Mon Apr 17 00:14:48 2000
@@ -104,11 +104,19 @@
{
struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
+ tp->syn_backlog++;
+
sk = tp->af_specific->syn_recv_sock(sk, skb, req, dst);
- req->sk = sk;
-
- /* Queue up for accept() */
- tcp_synq_queue(tp, req);
+ if (sk) {
+ req->sk = sk;
+
+ /* Queue up for accept() */
+ tcp_synq_queue(tp, req);
+ } else {
+ tp->syn_backlog--;
+ (*req->class->destructor)(req);
+ tcp_openreq_free(req);
+ }
return sk;
}
diff -u linux-2.2.14/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- linux-2.2.14/net/ipv4/tcp.c Sun Apr 16 04:35:21 2000
+++ linux/net/ipv4/tcp.c Mon Apr 17 00:14:48 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);
}
diff -u linux-2.2.14/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- linux-2.2.14/net/ipv4/tcp_input.c Sun Apr 16 04:35:21 2000
+++ linux/net/ipv4/tcp_input.c Mon Apr 17 00:14:48 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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]