From 519abeb185e343ea360c9082bfd17d09b3071579 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sat, 4 May 2019 12:02:41 +0000 Subject: [PATCH] MFC r345460: Limit the number of bytes which can be queued for SCTP sockets. This is joint work with rrs@. --- sys/netinet/sctp_output.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 0f496dd4e90..1af76c3eaa6 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -13026,12 +13026,7 @@ sctp_lower_sosend(struct socket *so, /* Calculate the maximum we can send */ inqueue_bytes = stcb->asoc.total_output_queue_size - (stcb->asoc.chunks_on_out_queue * SCTP_DATA_CHUNK_OVERHEAD(stcb)); if (SCTP_SB_LIMIT_SND(so) > inqueue_bytes) { - if (non_blocking) { - /* we already checked for non-blocking above. */ - max_len = sndlen; - } else { - max_len = SCTP_SB_LIMIT_SND(so) - inqueue_bytes; - } + max_len = SCTP_SB_LIMIT_SND(so) - inqueue_bytes; } else { max_len = 0; } -- 2.45.0