diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-06-20 21:47:12 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-06-20 21:47:12 +0000 |
commit | fabe3e5325077791311a6f3aaffa6c3f4315a4c6 (patch) | |
tree | fad58d482f9df8b19a5a2a10163f0626c67730d3 | |
parent | 8a0f58ccf06632bb6df85e702dc815203c70ed14 (diff) | |
download | FreeBSD-src-fabe3e5325077791311a6f3aaffa6c3f4315a4c6.zip FreeBSD-src-fabe3e5325077791311a6f3aaffa6c3f4315a4c6.tar.gz |
It's now the responsibility of the consumer of soabort() to remove a
socket from its accept queue when aborting it during a new inbound
connection. Update spx_input() to acquire the accept lock, assert
the condition of the socket on its parent queue, and approriately
disconnect it from the queue before calling soabort() on it.
-rw-r--r-- | sys/netipx/spx_usrreq.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index b9c7a11..a321cc8 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -314,8 +314,19 @@ spx_input(m, ipxp) return; dropwithreset: - if (dropsocket) + if (dropsocket) { + struct socket *head; + ACCEPT_LOCK(); + KASSERT((so->so_qstate & SQ_INCOMP) != 0, + ("spx_input: nascent socket not SQ_INCOMP on soabort()")); + head = so->so_head; + TAILQ_REMOVE(&head->so_incomp, so, so_list); + head->so_incqlen--; + so->so_qstate &= ~SQ_INCOMP; + so->so_head = NULL; + ACCEPT_UNLOCK(); soabort(so); + } si->si_seq = ntohs(si->si_seq); si->si_ack = ntohs(si->si_ack); si->si_alo = ntohs(si->si_alo); |