1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00

Honor the backlog field.

This commit is contained in:
Michael Tuexen 2017-06-23 08:35:54 +00:00
parent 3017b21bb6
commit 94f66d603a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320261

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);
}