Honor the backlog field.

This commit is contained in:
Michael Tuexen 2017-06-23 08:35:54 +00:00
parent 3017b21bb6
commit 94f66d603a

View File

@ -7143,7 +7143,11 @@ sctp_listen(struct socket *so, int backlog, struct thread *p)
solisten_proto(so, backlog);
SOCK_UNLOCK(so);
}
inp->sctp_flags |= SCTP_PCB_FLAGS_ACCEPTING;
if (backlog > 0) {
inp->sctp_flags |= SCTP_PCB_FLAGS_ACCEPTING;
} else {
inp->sctp_flags &= ~SCTP_PCB_FLAGS_ACCEPTING;
}
SCTP_INP_WUNLOCK(inp);
return (error);
}