diff options
author | Matt Caswell <matt@openssl.org> | 2017-06-20 16:36:30 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-06-21 14:56:24 +0100 |
commit | 9924087573cfbc8d2bc97088f36d1a81ca00cda3 (patch) | |
tree | 8154afee40669f8394aeff3b784543f65a21c903 /include | |
parent | 72257204bd2a88773461150765dfd0e0a428ee86 (diff) |
Fix DTLS failure when used in a build which has SCTP enabled
The value of BIO_CTRL_DGRAM_SET_PEEK_MODE was clashing with the value for
BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE. In an SCTP enabled build
BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE was used unconditionally with
the reasoning that it would be ignored if SCTP wasn't in use. Unfortunately
due to this clash, this wasn't the case. The BIO ended up going into peek
mode and was continually reading the same data over and over - throwing it
away as a replay.
Fixes #3723
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3724)
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/bio.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/openssl/bio.h b/include/openssl/bio.h index 0955b76365..5f8f83a99e 100644 --- a/include/openssl/bio.h +++ b/include/openssl/bio.h @@ -126,11 +126,10 @@ extern "C" { # define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49 -# define BIO_CTRL_DGRAM_SET_PEEK_MODE 50 - +/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */ +# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50 # ifndef OPENSSL_NO_SCTP /* SCTP stuff */ -# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50 # define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51 # define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52 # define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53 @@ -143,6 +142,8 @@ extern "C" { # define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70 # endif +# define BIO_CTRL_DGRAM_SET_PEEK_MODE 71 + /* modifiers */ # define BIO_FP_READ 0x02 # define BIO_FP_WRITE 0x04 |