summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-09-11 10:03:22 +0100
committerMatt Caswell <matt@openssl.org>2023-09-13 11:53:13 +0100
commit572f290c9c2d892d5f891c6b8dcebf4e1ac65aed (patch)
tree5e4dd55698633c68abb042e01e148b4bb23248df /crypto
parent122d4e20cd2e88daa64d8bfcd7b8a6e39a0260e4 (diff)
Fix a failure in bio_dgram_test on the NonStop platform
The size of the datagram header is significantly larger that we might expect on NonStop (probably driven by sizeof(BIO_ADDR)). We adjust the size of the default buffer to take into account the header size and the mtu. Fixes #22013 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22058)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bio/bss_dgram_pair.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/bio/bss_dgram_pair.c b/crypto/bio/bss_dgram_pair.c
index 534a2216aa..08dd802d8f 100644
--- a/crypto/bio/bss_dgram_pair.c
+++ b/crypto/bio/bss_dgram_pair.c
@@ -279,8 +279,9 @@ static int dgram_pair_init(BIO *bio)
if (b == NULL)
return 0;
- b->req_buf_len = 17*1024; /* default buffer size */
b->mtu = 1472; /* conservative default MTU */
+ /* default buffer size */
+ b->req_buf_len = 9 * (sizeof(struct dgram_hdr) + b->mtu);
b->lock = CRYPTO_THREAD_lock_new();
if (b->lock == NULL) {