diff options
Diffstat (limited to 'sys/netinet/sctp_usrreq.c')
| -rw-r--r-- | sys/netinet/sctp_usrreq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 5385420e34ed..1a254a24c723 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -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); } |
