]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Remove obsolete ifindex
authorAlexander Savchenko <oleksandr.savchenko.dn@bp.renesas.com>
Thu, 22 May 2025 11:19:38 +0000 (14:19 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 29 Sep 2025 19:46:24 +0000 (22:46 +0300)
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 <oleksandr.savchenko.dn@bp.renesas.com>
src/drivers/driver_nl80211.c

index 4bc2a3a65707a68f1336308c52d07476ca7556e1..349877bf43df42c948069f0252dde6fe4f90b30f 100644 (file)
@@ -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;