esp_wifi: clear old keys before going for new connection

pull/9422/head
Kapil Gupta 2022-07-12 10:43:34 +05:30
rodzic 68225b63de
commit 522e0a6b06
2 zmienionych plików z 7 dodań i 6 usunięć

@ -1 +1 @@
Subproject commit dc92d42a7393277597759a91e99e80fdd3f81da5
Subproject commit 693f0c2134e551b120fcb30dc5b929414a413a48

Wyświetl plik

@ -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;
}