mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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
This commit is contained in:
commit
322a2240f1
@ -1 +1 @@
|
||||
Subproject commit dc92d42a7393277597759a91e99e80fdd3f81da5
|
||||
Subproject commit 693f0c2134e551b120fcb30dc5b929414a413a48
|
@ -277,9 +277,9 @@ int wps_post(uint32_t sig, uint32_t par)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void wps_sendto_wrapper(void *buffer, uint16_t len)
|
||||
static int wps_sendto_wrapper(void *buffer, uint16_t len)
|
||||
{
|
||||
esp_wifi_internal_tx(WIFI_IF_STA, buffer, len);
|
||||
return esp_wifi_internal_tx(WIFI_IF_STA, buffer, len);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -301,9 +301,7 @@ static inline int wps_sm_ether_send(struct wps_sm *sm, const u8 *dest, u16 proto
|
||||
os_memcpy(eth->h_source, sm->ownaddr, ETH_ALEN);
|
||||
eth->h_proto = host_to_be16(proto);
|
||||
|
||||
wps_sendto_wrapper(buffer, sizeof(struct l2_ethhdr) + data_len);
|
||||
|
||||
return ESP_OK;
|
||||
return wps_sendto_wrapper(buffer, sizeof(struct l2_ethhdr) + data_len);
|
||||
}
|
||||
|
||||
|
||||
@ -648,6 +646,7 @@ int wps_send_eap_identity_rsp(u8 id)
|
||||
eap_buf = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_IDENTITY, sm->identity_len,
|
||||
EAP_CODE_RESPONSE, id);
|
||||
if (!eap_buf) {
|
||||
wpa_printf(MSG_ERROR, "eap buf allocation failed");
|
||||
ret = ESP_FAIL;
|
||||
goto _err;
|
||||
}
|
||||
@ -663,12 +662,14 @@ int wps_send_eap_identity_rsp(u8 id)
|
||||
|
||||
buf = wps_sm_alloc_eapol(sm, IEEE802_1X_TYPE_EAP_PACKET, wpabuf_head_u8(eap_buf), wpabuf_len(eap_buf), (size_t *)&len, NULL);
|
||||
if (!buf) {
|
||||
wpa_printf(MSG_ERROR, "buf allocation failed");
|
||||
ret = ESP_ERR_NO_MEM;
|
||||
goto _err;
|
||||
}
|
||||
|
||||
ret = wps_sm_ether_send(sm, bssid, ETH_P_EAPOL, buf, len);
|
||||
if (ret) {
|
||||
wpa_printf(MSG_ERROR, "wps sm ether send failed ret=%d", ret);
|
||||
ret = ESP_FAIL;
|
||||
goto _err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user