summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_usrreq.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2012-11-26 08:50:00 +0000
committertuexen <tuexen@FreeBSD.org>2012-11-26 08:50:00 +0000
commit6c15e1ad42a2d21abd42d20103bdc940ca0f971a (patch)
treef7a4a932e77a92a889f64825fabd9e39d108c629 /sys/netinet/sctp_usrreq.c
parentead7f1f7d0b49646e2d3dab460cbf3b99b228dfe (diff)
downloadFreeBSD-src-6c15e1ad42a2d21abd42d20103bdc940ca0f971a.zip
FreeBSD-src-6c15e1ad42a2d21abd42d20103bdc940ca0f971a.tar.gz
Allow shutdown() to be used on fds returned from sctp_peeloff().
MFC after: 3 days
Diffstat (limited to 'sys/netinet/sctp_usrreq.c')
-rw-r--r--sys/netinet/sctp_usrreq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 50f1be0..9c4a8b2 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -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;
OpenPOWER on IntegriCloud