summaryrefslogtreecommitdiffstats
path: root/ssl
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:33:09 +0000
commit3972dbe462c1e39f53892833d55941383c6854c4 (patch)
treecc84434566ba9974fcedc3d64b1ec0d4e8124ac6 /ssl
parent85615e33e526be9c420c92e85f3d73d94c7f2fe6 (diff)
Avoid unnecessary fragmentation.
(cherry picked from commit 80ccc66d7eedb2d06050130c77c482ae1584199a)
Diffstat (limited to 'ssl')
-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 de8bab873f..65ec0018ae 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,