Skip to content

Commit 322a224

Browse files
committed
Merge branch 'bugfix/eapol_drop_issue_v4.4' into 'release/v4.4'
esp_wifi: clear old keys before going for new connection(backport v4.4) See merge request espressif/esp-idf!18996
2 parents b68fd2b + 522e0a6 commit 322a224

File tree

2 files changed

+7
-6
lines changed
  • components

2 files changed

+7
-6
lines changed

components/wpa_supplicant/esp_supplicant/src/esp_wps.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ int wps_post(uint32_t sig, uint32_t par)
277277
}
278278
#endif
279279

280-
static void wps_sendto_wrapper(void *buffer, uint16_t len)
280+
static int wps_sendto_wrapper(void *buffer, uint16_t len)
281281
{
282-
esp_wifi_internal_tx(WIFI_IF_STA, buffer, len);
282+
return esp_wifi_internal_tx(WIFI_IF_STA, buffer, len);
283283
}
284284

285285
/*
@@ -301,9 +301,7 @@ static inline int wps_sm_ether_send(struct wps_sm *sm, const u8 *dest, u16 proto
301301
os_memcpy(eth->h_source, sm->ownaddr, ETH_ALEN);
302302
eth->h_proto = host_to_be16(proto);
303303

304-
wps_sendto_wrapper(buffer, sizeof(struct l2_ethhdr) + data_len);
305-
306-
return ESP_OK;
304+
return wps_sendto_wrapper(buffer, sizeof(struct l2_ethhdr) + data_len);
307305
}
308306

309307

@@ -648,6 +646,7 @@ int wps_send_eap_identity_rsp(u8 id)
648646
eap_buf = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_IDENTITY, sm->identity_len,
649647
EAP_CODE_RESPONSE, id);
650648
if (!eap_buf) {
649+
wpa_printf(MSG_ERROR, "eap buf allocation failed");
651650
ret = ESP_FAIL;
652651
goto _err;
653652
}
@@ -663,12 +662,14 @@ int wps_send_eap_identity_rsp(u8 id)
663662

664663
buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET, wpabuf_head_u8(eap_buf), wpabuf_len(eap_buf), (size_t *)&len, NULL);
665664
if (!buf) {
665+
wpa_printf(MSG_ERROR, "buf allocation failed");
666666
ret = ESP_ERR_NO_MEM;
667667
goto _err;
668668
}
669669

670670
ret = wps_sm_ether_send(sm, bssid, ETH_P_EAPOL, buf, len);
671671
if (ret) {
672+
wpa_printf(MSG_ERROR, "wps sm ether send failed ret=%d", ret);
672673
ret = ESP_FAIL;
673674
goto _err;
674675
}

0 commit comments

Comments
 (0)