Skip to content

Commit

Permalink
Merge branch 'bugfix/wps_condition_chain_v5.1' into 'release/v5.1'
Browse files Browse the repository at this point in the history
fix(wifi): Fix static analyzer warning for WPS code (v5.1)

See merge request espressif/esp-idf!26494
  • Loading branch information
jack0c committed Oct 19, 2023
2 parents ee6ea57 + 5457c4c commit 55d3bc2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/wpa_supplicant/esp_supplicant/src/esp_wps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,15 +1034,18 @@ int wps_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len)

tmp = (u8 *)(ehdr + 1) + 1;
ret = wps_process_wps_mX_req(tmp, plen - sizeof(*ehdr) - 1, &res);
if (ret == ESP_OK && res != WPS_FAILURE && res != WPS_FRAGMENT) {
if (res == WPS_FRAGMENT) {
wpa_printf(MSG_DEBUG, "wps frag, silently exit", res);
ret = ESP_OK;
break;
}
if (ret == ESP_OK && res != WPS_FAILURE) {
ret = wps_send_wps_mX_rsp(ehdr->identifier);

if (ret == ESP_OK) {
wpa_printf(MSG_DEBUG, "sm->wps->state = %d", sm->wps->state);
wps_start_msg_timer();
}
} else if (ret == ESP_OK && res == WPS_FRAGMENT) {
wpa_printf(MSG_DEBUG, "wps frag, continue...");
ret = ESP_OK;
} else {
ret = ESP_FAIL;
}
Expand Down

0 comments on commit 55d3bc2

Please sign in to comment.