summaryrefslogtreecommitdiffstats
path: root/ssl/d1_both.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@fh-muenster.de>2013-03-18 14:30:38 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-03-18 14:32:59 +0000
commit3f84d34c3729a6db7d9908219ab2b53f052e6d08 (patch)
tree28f214469246abc90c98ed7743b1c9b597d7890b /ssl/d1_both.c
parentd7e429b91d22c6e4eaa543a406297181f030c26b (diff)
Avoid unnecessary fragmentation.
(cherry picked from commit 80ccc66d7eedb2d06050130c77c482ae1584199a)
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r--ssl/d1_both.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 373285885c..bb9be8ad65 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -313,9 +313,10 @@ int dtls1_do_write(SSL *s, int type)
s->init_off -= DTLS1_HM_HEADER_LENGTH;
s->init_num += DTLS1_HM_HEADER_LENGTH;
- /* write atleast DTLS1_HM_HEADER_LENGTH bytes */
- if ( len <= DTLS1_HM_HEADER_LENGTH)
- len += DTLS1_HM_HEADER_LENGTH;
+ if ( s->init_num > curr_mtu)
+ len = curr_mtu;
+ else
+ len = s->init_num;
}
dtls1_fix_message_header(s, frag_off,