From: Matt Caswell Date: Mon, 26 Jan 2015 16:47:36 +0000 (+0000) Subject: Make DTLS always act as if read_ahead is set. The actual value of read_ahead X-Git-Tag: OpenSSL_1_0_2a~99 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=11b32d6e29b87eaf8d14f218ff2a739af2237555;p=oweals%2Fopenssl.git Make DTLS always act as if read_ahead is set. The actual value of read_ahead is ignored for DTLS. RT#3657 Reviewed-by: Andy Polyakov (cherry picked from commit 8dd4ad0ff5d1d07ec4b6dd5d5104131269a472aa) --- diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index ec56c55493..d5ddb609d2 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -231,7 +231,8 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) return -1; } - if (!s->read_ahead) + /* We always act like read_ahead is set for DTLS */ + if (!s->read_ahead && !SSL_IS_DTLS(s)) /* ignore max parameter */ max = n; else {