Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2017 08:35:54 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320261 - head/sys/netinet
Message-ID:  <201706230835.v5N8ZspM012138@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706230835.v5N8ZspM012138>