Messages in this thread Patch in this message | | | Subject | Re: dst cache overflow | From | Andi Kleen <> | Date | 13 Jan 2000 04:25:57 +0100 |
| |
kuznet@ms2.inr.ac.ru writes: > > I looked at output of netstat. It evidently shows a bug in kernel. > What is version of kernel? > > [ Dave! Look, he has 5000 of sockets sort of: > > tcp 0 1 195.67.71.80:80 152.166.64.3:1252 LAST_ACK off (0.00/0) > > Retransmission timers massively leak! > ]
It happens when you call send shutdown on a CLOSE_WAIT socket.
This patch should fix it. I also removed the useless check for TCP_SYN_RECV.
Jesse, could you try it?
--- linux/net/ipv4/tcp.c-o Mon Nov 15 02:35:46 1999 +++ linux/net/ipv4/tcp.c Thu Jan 13 04:20:44 2000 @@ -1449,11 +1449,11 @@ /* If we've already sent a FIN, or it's a closed state, skip this. */ if ((1 << sk->state) & - (TCPF_ESTABLISHED|TCPF_SYN_SENT|TCPF_SYN_RECV|TCPF_CLOSE_WAIT)) { + (TCPF_ESTABLISHED|TCPF_SYN_SENT|TCPF_CLOSE_WAIT)) { lock_sock(sk); /* Clear out any half completed packets. FIN if needed. */ - if (tcp_close_state(sk,0)) + if (tcp_close_state(sk,sk->state == TCP_CLOSE_WAIT)) tcp_send_fin(sk); release_sock(sk);
-Andi
-- This is like TV. I don't like TV.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |