git: 4abd7785da8b - stable/13 - sctp: apply limit for socket buffers as indicated in comment

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Tue, 22 Feb 2022 23:55:00 UTC
The branch stable/13 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=4abd7785da8b4706a4ec6648092f096495112f19

commit 4abd7785da8b4706a4ec6648092f096495112f19
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2021-12-27 17:15:29 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2022-02-22 23:53:31 +0000

    sctp: apply limit for socket buffers as indicated in comment
    
    (cherry picked from commit a859e9f9aa258841e988d2f6c5f860048e168923)
---
 sys/netinet/sctp_usrreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 850639d4b486..2450bde02986 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -73,7 +73,7 @@ sctp_init(void)
 	 */
 	sb_max_adj = (u_long)((u_quad_t)(SB_MAX) * MCLBYTES / (MSIZE + MCLBYTES));
 	SCTP_BASE_SYSCTL(sctp_sendspace) = min(sb_max_adj,
-	    (((uint32_t)nmbclusters / 2) * SCTP_DEFAULT_MAXSEGMENT));
+	    (((uint32_t)nmbclusters / 2) * MCLBYTES));
 	/*
 	 * Now for the recv window, should we take the same amount? or
 	 * should I do 1/2 the SB_MAX instead in the SB_MAX min above. For