提交 80ccc66d 编写于 作者: M Michael Tuexen 提交者: Dr. Stephen Henson

Avoid unnecessary fragmentation.

上级 5de18d5d
...@@ -313,9 +313,10 @@ int dtls1_do_write(SSL *s, int type) ...@@ -313,9 +313,10 @@ int dtls1_do_write(SSL *s, int type)
s->init_off -= DTLS1_HM_HEADER_LENGTH; s->init_off -= DTLS1_HM_HEADER_LENGTH;
s->init_num += DTLS1_HM_HEADER_LENGTH; s->init_num += DTLS1_HM_HEADER_LENGTH;
/* write atleast DTLS1_HM_HEADER_LENGTH bytes */ if ( s->init_num > curr_mtu)
if ( len <= DTLS1_HM_HEADER_LENGTH) len = curr_mtu;
len += DTLS1_HM_HEADER_LENGTH; else
len = s->init_num;
} }
dtls1_fix_message_header(s, frag_off, dtls1_fix_message_header(s, frag_off,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册