git: 094bf09d81d0 - stable/13 - sctp: ignore SCTP_SENDALL flag on 1-to-1 style sockets
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Feb 2023 23:00:24 UTC
The branch stable/13 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=094bf09d81d01c28c22c1969498abf241148fd06
commit 094bf09d81d01c28c22c1969498abf241148fd06
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2022-05-28 17:07:10 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-02-01 23:00:00 +0000
sctp: ignore SCTP_SENDALL flag on 1-to-1 style sockets
(cherry picked from commit e2ceff302833ee5f90ac2437efe3670cafcbdd46)
---
sys/netinet/sctp_output.c | 14 ++++++++------
1 file 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);