DtlsMsgPoolSend: Use correct sendSz

pool->sz is the size without the record header. The handshake header is present already.

Reproducible with
  ./udp_proxy -p 12345 -s 127.0.0.1:11111 -x 1:3 -S server
or
  ./udp_proxy -p 12345 -s 127.0.0.1:11111 -x 1:3 -S server
and
  ./examples/server/server -l ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305 -u -i
  ./examples/client/client -l ECDHE-RSA-AES256-GCM-SHA384 -u -R -p 12345 -i
This commit is contained in:
Juliusz Sosinowicz
2022-12-19 17:01:37 +01:00
parent 3d1775320b
commit 53b2be06d3

View File

@@ -8857,9 +8857,8 @@ int DtlsMsgPoolSend(WOLFSSL* ssl, int sendOnlyFirstPacket)
#endif
/* add back in header space from saved pool size */
sendSz += DTLS_HANDSHAKE_EXTRA;
sendSz += DTLS_RECORD_EXTRA;
/* add back in record header space from saved pool size */
sendSz += DTLS_RECORD_HEADER_SZ;
if ((ret = CheckAvailableSize(ssl, sendSz)) != 0) {
WOLFSSL_ERROR(ret);