Add missing socket lock.

MFC after:	1 week
This commit is contained in:
Michael Tuexen 2017-09-22 06:07:47 +00:00
parent 67e4d800ec
commit afb908dada

View File

@ -2484,7 +2484,9 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id)
inp->sctp_flags = (SCTP_PCB_FLAGS_TCPTYPE |
SCTP_PCB_FLAGS_UNBOUND);
/* Be sure we have blocking IO by default */
SOCK_LOCK(so);
SCTP_CLEAR_SO_NBIO(so);
SOCK_UNLOCK(so);
} else {
/*
* unsupported socket type (RAW, etc)- in case we missed it