summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2022-05-28 17:07:10 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2023-02-01 23:00:00 +0000
commit094bf09d81d01c28c22c1969498abf241148fd06 (patch)
tree29bc0e68405fc43a176c13bf95c5284ad11a8c28 /sys/netinet
parentf25aa6dc17d761c4cf2727e630f5aee128f10403 (diff)
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index dfad4e5dfa08..7c0c953c7504 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -12535,17 +12535,19 @@ sctp_lower_sosend(struct socket *so,
if (flags & MSG_EOF) {
sinfo_flags |= SCTP_EOF;
}
- if (sinfo_flags & SCTP_SENDALL) {
- error = sctp_sendall(inp, uio, top, srcv);
- top = NULL;
- goto out_unlocked;
- }
if ((sinfo_flags & SCTP_ADDR_OVER) && (addr == NULL)) {
error = EINVAL;
goto out_unlocked;
}
- /* Now we must find the association. */
SCTP_INP_RLOCK(inp);
+ if ((sinfo_flags & SCTP_SENDALL) &&
+ (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE)) {
+ SCTP_INP_RUNLOCK(inp);
+ error = sctp_sendall(inp, uio, top, srcv);
+ top = NULL;
+ goto out_unlocked;
+ }
+ /* Now we must find the association. */
if ((inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) ||
(inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
stcb = LIST_FIRST(&inp->sctp_asoc_list);