svn commit: r320261 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Fri Jun 23 08:35:56 UTC 2017


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


More information about the svn-src-all mailing list