Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2012 08:50:00 +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: r243558 - head/sys/netinet
Message-ID:  <201211260850.qAQ8o05Z042207@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Mon Nov 26 08:50:00 2012
New Revision: 243558
URL: http://svnweb.freebsd.org/changeset/base/243558

Log:
  Allow shutdown() to be used on fds returned from sctp_peeloff().
  
  MFC after: 3 days

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Mon Nov 26 05:13:57 2012	(r243557)
+++ head/sys/netinet/sctp_usrreq.c	Mon Nov 26 08:50:00 2012	(r243558)
@@ -971,7 +971,8 @@ sctp_shutdown(struct socket *so)
 	}
 	SCTP_INP_RLOCK(inp);
 	/* For UDP model this is a invalid call */
-	if (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) {
+	if (!((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
+	    (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) {
 		/* Restore the flags that the soshutdown took away. */
 		SOCKBUF_LOCK(&so->so_rcv);
 		so->so_rcv.sb_state &= ~SBS_CANTRCVMORE;



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