aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 19:33:31 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:32:11 -0700
commit83e3609eba3818f6e18b8bf9442195169ac306b7 (patch)
treeb0dd71b7e5ea6e8b17813cf6b3736a1b0f443ab7 /net/ipv4/tcp.c
parent[NETFILTER]: Add ctnetlink subsystem (diff)
downloadlinux-dev-83e3609eba3818f6e18b8bf9442195169ac306b7.tar.xz
linux-dev-83e3609eba3818f6e18b8bf9442195169ac306b7.zip
[REQSK]: Move the syn_table destroy from tcp_listen_stop to reqsk_queue_destroy
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/tcp.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index d2696af46c70..42a2e2ccd430 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -487,7 +487,7 @@ int tcp_listen_start(struct sock *sk)
}
sk->sk_state = TCP_CLOSE;
- reqsk_queue_destroy(&tp->accept_queue);
+ __reqsk_queue_destroy(&tp->accept_queue);
return -EADDRINUSE;
}
@@ -499,38 +499,23 @@ int tcp_listen_start(struct sock *sk)
static void tcp_listen_stop (struct sock *sk)
{
struct tcp_sock *tp = tcp_sk(sk);
- struct listen_sock *lopt;
struct request_sock *acc_req;
struct request_sock *req;
- int i;
tcp_delete_keepalive_timer(sk);
/* make all the listen_opt local to us */
- lopt = reqsk_queue_yank_listen_sk(&tp->accept_queue);
acc_req = reqsk_queue_yank_acceptq(&tp->accept_queue);
- if (lopt->qlen) {
- for (i = 0; i < TCP_SYNQ_HSIZE; i++) {
- while ((req = lopt->syn_table[i]) != NULL) {
- lopt->syn_table[i] = req->dl_next;
- lopt->qlen--;
- reqsk_free(req);
-
- /* Following specs, it would be better either to send FIN
- * (and enter FIN-WAIT-1, it is normal close)
- * or to send active reset (abort).
- * Certainly, it is pretty dangerous while synflood, but it is
- * bad justification for our negligence 8)
- * To be honest, we are not able to make either
- * of the variants now. --ANK
- */
- }
- }
- }
- BUG_TRAP(!lopt->qlen);
-
- kfree(lopt);
+ /* Following specs, it would be better either to send FIN
+ * (and enter FIN-WAIT-1, it is normal close)
+ * or to send active reset (abort).
+ * Certainly, it is pretty dangerous while synflood, but it is
+ * bad justification for our negligence 8)
+ * To be honest, we are not able to make either
+ * of the variants now. --ANK
+ */
+ reqsk_queue_destroy(&tp->accept_queue);
while ((req = acc_req) != NULL) {
struct sock *child = req->sk;