From: Alexander Savchenko Date: Thu, 22 May 2025 11:19:38 +0000 (+0300) Subject: nl80211: Remove obsolete ifindex X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=521056c5fe58faeb9fe1c43b33649fa7fb84b384;p=thirdparty%2Fhostap.git nl80211: Remove obsolete ifindex When the ifindex of the interface is changed, the obsolete ifindex is not removed from the drv->if_indices[] and have_idx() returns false positive. Signed-off-by: Alexander Savchenko --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 4bc2a3a65..349877bf4 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1241,6 +1241,7 @@ static int wpa_driver_nl80211_own_ifindex(struct wpa_driver_nl80211_data *drv, nl80211_check_global(drv->global); wpa_printf(MSG_DEBUG, "nl80211: Update ifindex for a removed " "interface"); + del_ifidx(drv, drv->ifindex, IFIDX_ANY); if (wpa_driver_nl80211_finish_drv_init(drv, NULL, 0, NULL, WPA_P2P_MODE_WFD_R1) < 0) return -1;