Remove explicit setting of read_ahead for DTLS. It never makes sense not to
authorMatt Caswell <matt@openssl.org>
Mon, 26 Jan 2015 16:46:49 +0000 (16:46 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 27 Jan 2015 14:28:41 +0000 (14:28 +0000)
use read_ahead with DTLS because it doesn't work. Therefore read_ahead needs
to be the default.

Reviewed-by: Andy Polyakov <appro@openssl.org>
apps/s_client.c
apps/s_server.c

index e30857f29ad340fc1fadf1ba0fa786ea0d7f0367..0c4e6bdbd97dde22fc012e5075a57d6c1f0922dc 100644 (file)
@@ -1299,12 +1299,6 @@ int MAIN(int argc, char **argv)
 #endif
     if (exc)
         ssl_ctx_set_excert(ctx, exc);
-    /*
-     * DTLS: partial reads end up discarding unread UDP bytes :-( Setting
-     * read ahead solves this problem.
-     */
-    if (socket_type == SOCK_DGRAM)
-        SSL_CTX_set_read_ahead(ctx, 1);
 
 #if !defined(OPENSSL_NO_TLSEXT)
 # if !defined(OPENSSL_NO_NEXTPROTONEG)
index 4dae4d52712615929fa2ddb625659ce13ff9b6cf..e07df852917d4e1b71cea3768e934692c5d95d0e 100644 (file)
@@ -1722,12 +1722,6 @@ int MAIN(int argc, char *argv[])
         SSL_CTX_set_options(ctx, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
     if (exc)
         ssl_ctx_set_excert(ctx, exc);
-    /*
-     * DTLS: partial reads end up discarding unread UDP bytes :-( Setting
-     * read ahead solves this problem.
-     */
-    if (socket_type == SOCK_DGRAM)
-        SSL_CTX_set_read_ahead(ctx, 1);
 
     if (state)
         SSL_CTX_set_info_callback(ctx, apps_ssl_info_callback);
@@ -1806,12 +1800,6 @@ int MAIN(int argc, char *argv[])
             SSL_CTX_set_options(ctx2, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
         if (exc)
             ssl_ctx_set_excert(ctx2, exc);
-        /*
-         * DTLS: partial reads end up discarding unread UDP bytes :-(
-         * Setting read ahead solves this problem.
-         */
-        if (socket_type == SOCK_DGRAM)
-            SSL_CTX_set_read_ahead(ctx2, 1);
 
         if (state)
             SSL_CTX_set_info_callback(ctx2, apps_ssl_info_callback);