From 5f69aba32baf9f465c44393962e99d4902282a61 Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Mon, 2 Jul 2018 17:30:27 -0700 Subject: [PATCH] eap-peap: add warning for the missing M flag --- src/eap-peap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/eap-peap.c b/src/eap-peap.c index 151072bc..48f96395 100644 --- a/src/eap-peap.c +++ b/src/eap-peap.c @@ -592,6 +592,16 @@ static bool eap_peap_init_request_assembly(struct eap_state *eap, if (peap->rx_pdu_buf || len < 4) return false; + /* + * Some of the PEAP server implementations brake the protocol and do not + * set the M flag for the first packet during the fragmented + * transmission. To stay compatible with such devices, we have relaxed + * this requirement in iwd. + */ + if (!(flags & PEAP_FLAG_M)) + l_warn("Server has failed to set the M flag in the first packet" + " of the fragmented transmission."); + peap->rx_pdu_buf_len = l_get_be32(pkt); if (!peap->rx_pdu_buf_len || peap->rx_pdu_buf_len > PEAP_PDU_MAX_LEN) {