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:
parent
234489efd1
commit
128d46be9f
2 changed files with 10 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue