Make DTLS always act as if read_ahead is set. The actual value of read_ahead
[openssl.git] / ssl / s3_pkt.c
index ec56c554934f5fb93ee6666c8e8b67124674ba4b..d5ddb609d2bca7fa5ab3e45ff6354960fc3bdaf2 100644 (file)
@@ -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 {