diff options
author | Matt Caswell <matt@openssl.org> | 2014-12-01 11:13:15 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-12-03 09:23:46 +0000 |
commit | 001235778a6e9c645dc0507cad6092d99c9af8f5 (patch) | |
tree | 165077faace58f4ff7297987c1d4c3073676b1d5 /ssl | |
parent | cf75017bfd60333ff65edf9840001cd2c49870a3 (diff) |
The SSL_OP_NO_QUERY_MTU option is supposed to stop the mtu from being
automatically updated, and we should use the one provided instead.
Unfortunately there are a couple of locations where this is not respected.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/d1_both.c | 11 | ||||
-rw-r--r-- | ssl/d1_lib.c | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 23d97cb127..5fba38d37e 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -355,10 +355,17 @@ int dtls1_do_write(SSL *s, int type) */ if ( BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_MTU_EXCEEDED, 0, NULL) > 0 ) - s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), - BIO_CTRL_DGRAM_QUERY_MTU, 0, NULL); + { + if(!(SSL_get_options(s) & SSL_OP_NO_QUERY_MTU)) + s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), + BIO_CTRL_DGRAM_QUERY_MTU, 0, NULL); + else + return -1; + } else + { return(-1); + } } else { diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index ab8730c883..09268b8790 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -453,7 +453,8 @@ int dtls1_check_timeout_num(SSL *s) s->d1->timeout.num_alerts++; /* Reduce MTU after 2 unsuccessful retransmissions */ - if (s->d1->timeout.num_alerts > 2) + if (s->d1->timeout.num_alerts > 2 + && !(SSL_get_options(s) & SSL_OP_NO_QUERY_MTU)) { s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_GET_FALLBACK_MTU, 0, NULL); } |