summaryrefslogtreecommitdiffstats
path: root/ssl/d1_both.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-03-07 15:14:16 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-03-07 15:14:16 +0000
commit725713f74abce64cf122d33a3de2f7490a6b482b (patch)
tree2d03cb88edabee0d47ef9cb338579a680f2f4df1 /ssl/d1_both.c
parent73eb0972cf35c7d94a401dd2b0037ec362d4d42f (diff)
PR: 2755
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reduce MTU after failed transmissions. [0.9.8 version of patch]
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r--ssl/d1_both.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 85f4d83efe..4481c55051 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -227,14 +227,14 @@ int dtls1_do_write(SSL *s, int type)
unsigned int len, frag_off, mac_size, blocksize;
/* AHA! Figure out the MTU, and stick to the right size */
- if ( ! (SSL_get_options(s) & SSL_OP_NO_QUERY_MTU))
+ if (s->d1->mtu < dtls1_min_mtu() && !(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);
/* I've seen the kernel return bogus numbers when it doesn't know
* (initial write), so just make sure we have a reasonable number */
- if ( s->d1->mtu < dtls1_min_mtu())
+ if (s->d1->mtu < dtls1_min_mtu())
{
s->d1->mtu = 0;
s->d1->mtu = dtls1_guess_mtu(s->d1->mtu);