aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_output.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2020-01-04 20:33:12 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2020-01-04 20:33:12 +0000
commitae7cc6c9f80cba5dea408c1a42172081366d8938 (patch)
tree7d4ffa824b851eac51fc4b933becd44ebe6d0e9c /sys/netinet/sctp_output.c
parentcd0d51baaa4509a1db83251a601d34404d20c990 (diff)
downloadsrc-ae7cc6c9f80cba5dea408c1a42172081366d8938.tar.gz
src-ae7cc6c9f80cba5dea408c1a42172081366d8938.zip
Make the message size limit used for SCTP_SENDALL configurable via
a sysctl variable instead of a compiled in constant. This is based on a patch provided by nwhitehorn@.
Notes
Notes: svn path=/head/; revision=356357
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r--sys/netinet/sctp_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 52fd7ed27d6d..b65d0f7c149e 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -6885,8 +6885,8 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m,
/* There is another. */
return (EBUSY);
}
- if (uio->uio_resid > SCTP_MAX_SENDALL_LIMIT) {
- /* You must be less than the max! */
+ if (uio->uio_resid > SCTP_BASE_SYSCTL(sctp_sendall_limit)) {
+ /* You must not be larger than the limit! */
return (EMSGSIZE);
}
SCTP_MALLOC(ca, struct sctp_copy_all *, sizeof(struct sctp_copy_all),