mirror of
https://github.com/esphome/esphome.git
synced 2026-08-31 01:56:01 +00:00
Take STA netif down in authmode-downgrade disconnect path too
This commit is contained in:
@@ -550,6 +550,9 @@ void WiFiComponent::wifi_event_callback(System_Event_t *event) {
|
||||
// https://lbsfilm.at/blog/wpa2-authenticationmode-downgrade-in-espressif-microprocessors
|
||||
if (it.old_mode != AUTH_OPEN && it.new_mode == AUTH_OPEN) {
|
||||
ESP_LOGW(TAG, "Potential Authmode downgrade detected, disconnecting");
|
||||
#if LWIP_VERSION_MAJOR != 1
|
||||
sta_netif_down();
|
||||
#endif
|
||||
wifi_station_disconnect();
|
||||
global_wifi_component->error_from_callback_ = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user