3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-19 11:09:25 +01:00

eap-ttls: Fix msg size miscalculation

This commit is contained in:
Tim Kourt 2016-11-07 13:55:17 -08:00 committed by Denis Kenzior
parent ee074153ed
commit fe90dcaab4

View File

@ -590,7 +590,7 @@ static void eap_ttls_handle_request(struct eap_state *eap,
* response instead of passing the TLS alert.
*/
if (ttls->tx_pkt_len <= eap_get_mtu(eap)) {
if (ttls->tx_pkt_len + 6 <= eap_get_mtu(eap)) {
/*
* Response fits in a single response packet, prepend the
* 6-byte header (no length) before the data.