Author: tuexen
Date: Fri Jun 23 08:35:54 2017
New Revision: 320261
URL: https://svnweb.freebsd.org/changeset/base/320261

Log:
  Honor the backlog field.

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c      Fri Jun 23 08:34:01 2017        
(r320260)
+++ head/sys/netinet/sctp_usrreq.c      Fri Jun 23 08:35:54 2017        
(r320261)
@@ -7143,7 +7143,11 @@ sctp_listen(struct socket *so, int backlog, struct thr
                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);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to