Avoid unnecessary fragmentation.
(cherry picked from commit 80ccc66d7e
)
This commit is contained in:
parent
1643edc63c
commit
05689a132c
1 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue