sctp: Remove special handling for a listen(2) backlog of 0
... when applied to one-to-one-style sockets. sctp_listen() cannot be used to toggle the listening state of such a socket. See RFC 6458's description of expected listen(2) semantics for one-to-one- and one-to-many-style sockets. Reviewed by: tuexen MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31774
This commit is contained in:
parent
523d58aad1
commit
c4b44adcf0
@ -7249,14 +7249,16 @@ sctp_listen(struct socket *so, int backlog, struct thread *p)
|
||||
}
|
||||
if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) == 0) {
|
||||
solisten_proto(so, backlog);
|
||||
} else {
|
||||
solisten_proto_abort(so);
|
||||
}
|
||||
SOCK_UNLOCK(so);
|
||||
if (backlog > 0) {
|
||||
SOCK_UNLOCK(so);
|
||||
inp->sctp_flags |= SCTP_PCB_FLAGS_ACCEPTING;
|
||||
} else {
|
||||
inp->sctp_flags &= ~SCTP_PCB_FLAGS_ACCEPTING;
|
||||
solisten_proto_abort(so);
|
||||
SOCK_UNLOCK(so);
|
||||
if (backlog > 0) {
|
||||
inp->sctp_flags |= SCTP_PCB_FLAGS_ACCEPTING;
|
||||
} else {
|
||||
inp->sctp_flags &= ~SCTP_PCB_FLAGS_ACCEPTING;
|
||||
}
|
||||
}
|
||||
out:
|
||||
SCTP_INP_WUNLOCK(inp);
|
||||
|
Loading…
Reference in New Issue
Block a user