diff options
author | tuexen <tuexen@FreeBSD.org> | 2012-11-26 08:50:00 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2012-11-26 08:50:00 +0000 |
commit | 6c15e1ad42a2d21abd42d20103bdc940ca0f971a (patch) | |
tree | f7a4a932e77a92a889f64825fabd9e39d108c629 | |
parent | ead7f1f7d0b49646e2d3dab460cbf3b99b228dfe (diff) | |
download | FreeBSD-src-6c15e1ad42a2d21abd42d20103bdc940ca0f971a.zip FreeBSD-src-6c15e1ad42a2d21abd42d20103bdc940ca0f971a.tar.gz |
Allow shutdown() to be used on fds returned from sctp_peeloff().
MFC after: 3 days
-rw-r--r-- | sys/netinet/sctp_usrreq.c | 3 |
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; |