EAP-TEAP: Add parsing of Error TLV

This TLV needs to be processed properly instead of NAK'ed as
unsupported.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-08-16 23:25:31 +03:00
parent 234489efd1
commit 128d46be9f
2 changed files with 10 additions and 0 deletions

View file

@ -461,6 +461,15 @@ int eap_teap_parse_tlv(struct eap_teap_tlv_parse *tlv,
tlv->nak = pos;
tlv->nak_len = len;
break;
case TEAP_TLV_ERROR:
if (len < 4) {
wpa_printf(MSG_INFO, "EAP-TEAP: Too short Error TLV");
tlv->result = TEAP_STATUS_FAILURE;
break;
}
tlv->error_code = WPA_GET_BE32(pos);
wpa_printf(MSG_DEBUG, "EAP-TEAP: Error: %u", tlv->error_code);
break;
case TEAP_TLV_REQUEST_ACTION:
wpa_hexdump(MSG_MSGDUMP, "EAP-TEAP: Request-Action TLV",
pos, len);

View file

@ -188,6 +188,7 @@ struct eap_teap_tlv_parse {
size_t basic_auth_req_len;
u8 *basic_auth_resp;
size_t basic_auth_resp_len;
u32 error_code;
};
void eap_teap_put_tlv_hdr(struct wpabuf *buf, u16 type, u16 len);