Author: tuexen
Date: Mon May 30 18:24:23 2016
New Revision: 301000
URL: https://svnweb.freebsd.org/changeset/base/301000

Log:
  Add PR_CONNREQUIRED for SOCK_STREAM sockets using SCTP.
  
  This is required to signal connetion setup on non-blocking sockets
  via becoming writable. This still allows for implicit connection
  setup.
  
  MFC after:    1 week

Modified:
  head/sys/netinet/in_proto.c
  head/sys/netinet6/in6_proto.c

Modified: head/sys/netinet/in_proto.c
==============================================================================
--- head/sys/netinet/in_proto.c Mon May 30 16:52:23 2016        (r300999)
+++ head/sys/netinet/in_proto.c Mon May 30 18:24:23 2016        (r301000)
@@ -176,7 +176,7 @@ struct protosw inetsw[] = {
        .pr_type =              SOCK_STREAM,
        .pr_domain =            &inetdomain,
        .pr_protocol =          IPPROTO_SCTP,
-       .pr_flags =             PR_WANTRCVD,
+       .pr_flags =             PR_CONNREQUIRED|PR_WANTRCVD,
        .pr_input =             sctp_input,
        .pr_ctlinput =          sctp_ctlinput,
        .pr_ctloutput =         sctp_ctloutput,

Modified: head/sys/netinet6/in6_proto.c
==============================================================================
--- head/sys/netinet6/in6_proto.c       Mon May 30 16:52:23 2016        
(r300999)
+++ head/sys/netinet6/in6_proto.c       Mon May 30 18:24:23 2016        
(r301000)
@@ -207,7 +207,7 @@ struct protosw inet6sw[] = {
        .pr_type =              SOCK_STREAM,
        .pr_domain =            &inet6domain,
        .pr_protocol =          IPPROTO_SCTP,
-       .pr_flags =             PR_WANTRCVD,
+       .pr_flags =             PR_CONNREQUIRED|PR_WANTRCVD,
        .pr_input =             sctp6_input,
        .pr_ctlinput =          sctp6_ctlinput,
        .pr_ctloutput =         sctp_ctloutput,
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to