diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-10-30 19:44:40 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-10-30 19:44:40 +0000 |
commit | 49831ed8da06ffadf684484671b4561c9ac55f9f (patch) | |
tree | 779e3d7a8028f1ac29696c62ad8b70ba7bc70d2e /sys/netipx | |
parent | 1d93f083bf03400439b86271732e2b3f17ba284c (diff) | |
download | FreeBSD-src-49831ed8da06ffadf684484671b4561c9ac55f9f.zip FreeBSD-src-49831ed8da06ffadf684484671b4561c9ac55f9f.tar.gz |
Push the assignment of a new or updated so_qlimit from solisten()
following the protocol pru_listen() call to solisten_proto(), so
that it occurs under the socket lock acquisition that also sets
SO_ACCEPTCONN. This requires passing the new backlog parameter
to the protocol, which also allows the protocol to be aware of
changes in queue limit should it wish to do something about the
new queue limit. This continues a move towards the socket layer
acting as a library for the protocol.
Bump __FreeBSD_version due to a change in the in-kernel protocol
interface. This change has been tested with IPv4 and UNIX domain
sockets, but not other protocols.
Diffstat (limited to 'sys/netipx')
-rw-r--r-- | sys/netipx/spx_usrreq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index 25042e6..30bc70a 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -99,7 +99,7 @@ static int spx_connect(struct socket *so, struct sockaddr *nam, struct thread *td); static int spx_detach(struct socket *so); static int spx_usr_disconnect(struct socket *so); -static int spx_listen(struct socket *so, struct thread *td); +static int spx_listen(struct socket *so, int backlog, struct thread *td); static int spx_rcvd(struct socket *so, int flags); static int spx_rcvoob(struct socket *so, struct mbuf *m, int flags); static int spx_send(struct socket *so, int flags, struct mbuf *m, @@ -1518,8 +1518,9 @@ spx_usr_disconnect(so) } static int -spx_listen(so, td) +spx_listen(so, backlog, td) struct socket *so; + int backlog; struct thread *td; { int error; @@ -1538,7 +1539,7 @@ spx_listen(so, td) error = ipx_pcbbind(ipxp, NULL, td); if (error == 0) { cb->s_state = TCPS_LISTEN; - solisten_proto(so); + solisten_proto(so, backlog); } SOCK_UNLOCK(so); IPX_UNLOCK(ipxp); |