From 525f16040f8dcb43125d00ca54cc67349155edda Mon Sep 17 00:00:00 2001 From: tuexen Date: Mon, 30 May 2016 18:24:23 +0000 Subject: [PATCH] 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 --- sys/netinet/in_proto.c | 2 +- sys/netinet6/in6_proto.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 1d32caf42b90..f7ef48092ee3 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -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, diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index acc3fe26d46b..4ab14dd23367 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -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,