]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Update drv->ifindex on removing the first BSS
authorFelix Fietkau <nbd@nbd.name>
Thu, 4 Apr 2024 10:52:11 +0000 (12:52 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 15 Apr 2024 20:00:58 +0000 (23:00 +0300)
Otherwise it will point at the ifindex of the just removed BSS.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
src/drivers/driver_nl80211.c

index 4949de5772a74a194bc8a3b8934e1900ee632fc5..863497e8fe862252584fe737d6b81c78d6937f75 100644 (file)
@@ -8989,6 +8989,7 @@ static int wpa_driver_nl80211_if_remove(struct i802_bss *bss,
                if (drv->first_bss->next) {
                        drv->first_bss = drv->first_bss->next;
                        drv->ctx = drv->first_bss->ctx;
+                       drv->ifindex = drv->first_bss->ifindex;
                        os_free(bss);
                } else {
                        wpa_printf(MSG_DEBUG, "nl80211: No second BSS to reassign context to");