summaryrefslogtreecommitdiffstats
path: root/sys/netipx/spx_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netipx/spx_usrreq.c')
-rw-r--r--sys/netipx/spx_usrreq.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index 65901f2..25042e6 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -1532,10 +1532,15 @@ spx_listen(so, td)
IPX_LIST_LOCK();
IPX_LOCK(ipxp);
- if (ipxp->ipxp_lport == 0)
+ SOCK_LOCK(so);
+ error = solisten_proto_check(so);
+ if (error == 0 && ipxp->ipxp_lport == 0)
error = ipx_pcbbind(ipxp, NULL, td);
- if (error == 0)
+ if (error == 0) {
cb->s_state = TCPS_LISTEN;
+ solisten_proto(so);
+ }
+ SOCK_UNLOCK(so);
IPX_UNLOCK(ipxp);
IPX_LIST_UNLOCK();
return (error);
OpenPOWER on IntegriCloud