diff options
author | jdp <jdp@FreeBSD.org> | 2005-11-22 01:55:29 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2005-11-22 01:55:29 +0000 |
commit | 88e469fc5083b70eab339b18a18b33d012773040 (patch) | |
tree | b4feb176f68c2f6cdc3ad72a0c86288a45c2bcbb /sys | |
parent | 795233d73ae4a3e1a38dac764d263477d0b0e2c7 (diff) | |
download | FreeBSD-src-88e469fc5083b70eab339b18a18b33d012773040.zip FreeBSD-src-88e469fc5083b70eab339b18a18b33d012773040.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/uipc_sockbuf.c | 2 | ||||
-rw-r--r-- | 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 017dc88..0e2609b 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 017dc88..0e2609b 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; |