mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
DTLS MTU: check MTU on write
This commit is contained in:
@ -30322,8 +30322,16 @@ int wolfSSL_GetMaxRecordSize(WOLFSSL* ssl, int maxFragment)
|
|||||||
}
|
}
|
||||||
#endif /* HAVE_MAX_FRAGMENT */
|
#endif /* HAVE_MAX_FRAGMENT */
|
||||||
#ifdef WOLFSSL_DTLS
|
#ifdef WOLFSSL_DTLS
|
||||||
if (IsDtlsNotSctpMode(ssl) && (maxFragment > MAX_UDP_SIZE)) {
|
if (IsDtlsNotSctpMode(ssl)) {
|
||||||
maxFragment = MAX_UDP_SIZE;
|
if (maxFragment > MAX_UDP_SIZE) {
|
||||||
|
maxFragment = MAX_UDP_SIZE;
|
||||||
|
}
|
||||||
|
#if defined(WOLFSSL_DTLS_MTU)
|
||||||
|
if (maxFragment >
|
||||||
|
ssl->dtlsMtuSz - RECORD_HEADER_SZ - DTLS_RECORD_EXTRA) {
|
||||||
|
maxFragment = ssl->dtlsMtuSz - RECORD_HEADER_SZ - DTLS_RECORD_EXTRA;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user