@@ -1176,7 +1176,7 @@ static int eap_fast_process_decrypted(struct eap_sm *sm,
struct wpabuf *decrypted,
struct wpabuf **out_data)
{
- struct wpabuf *resp = NULL, *tmp;
+ struct wpabuf *resp = NULL, *tmp, *binding = NULL;
struct eap_fast_tlv_parse tlv;
int failed = 0;
@@ -1199,13 +1199,11 @@ static int eap_fast_process_decrypted(struct eap_sm *sm,
}
if (tlv.crypto_binding) {
- tmp = eap_fast_process_crypto_binding(sm, data, ret,
- tlv.crypto_binding,
- tlv.crypto_binding_len);
- if (tmp == NULL)
+ binding = eap_fast_process_crypto_binding(
+ sm, data, ret, tlv.crypto_binding,
+ tlv.crypto_binding_len);
+ if (!binding)
failed = 1;
- else
- resp = wpabuf_concat(resp, tmp);
}
if (tlv.iresult == EAP_TLV_RESULT_SUCCESS) {
@@ -1214,6 +1212,9 @@ static int eap_fast_process_decrypted(struct eap_sm *sm,
resp = wpabuf_concat(resp, tmp);
}
+ if (binding)
+ resp = wpabuf_concat(resp, binding);
+
if (tlv.eap_payload_tlv) {
tmp = eap_fast_process_eap_payload_tlv(
sm, data, ret, tlv.eap_payload_tlv,