From ba3612cd5ceb503a9e3a26495f9bdfbad5612616 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Tue, 22 Nov 2005 01:55:29 +0000 Subject: [PATCH] Fix a bug in the loop in sonewconn that makes room on the incomplete connection queue for a new connection. It was removing connections from the wrong list. Submitted by: Paul Mikesell Sponsored by: Isilon Systems MFC after: 1 week --- sys/kern/uipc_sockbuf.c | 2 +- sys/kern/uipc_socket2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 017dc88511da..0e2609bd02b7 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -261,7 +261,7 @@ sonewconn(head, connstatus) while (head->so_incqlen > head->so_qlimit) { struct socket *sp; sp = TAILQ_FIRST(&head->so_incomp); - TAILQ_REMOVE(&so->so_incomp, sp, so_list); + TAILQ_REMOVE(&head->so_incomp, sp, so_list); head->so_incqlen--; sp->so_qstate &= ~SQ_INCOMP; sp->so_head = NULL; diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 017dc88511da..0e2609bd02b7 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -261,7 +261,7 @@ sonewconn(head, connstatus) while (head->so_incqlen > head->so_qlimit) { struct socket *sp; sp = TAILQ_FIRST(&head->so_incomp); - TAILQ_REMOVE(&so->so_incomp, sp, so_list); + TAILQ_REMOVE(&head->so_incomp, sp, so_list); head->so_incqlen--; sp->so_qstate &= ~SQ_INCOMP; sp->so_head = NULL;