diff mbox series

[1/7] driver_nl80211: update drv->ifindex on removing the first BSS

Message ID 20240404105217.12478-1-nbd@nbd.name
State Accepted
Headers show
Series [1/7] driver_nl80211: update drv->ifindex on removing the first BSS | expand

Commit Message

Felix Fietkau April 4, 2024, 10:52 a.m. UTC
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 | 1 +
 1 file changed, 1 insertion(+)

Comments

Jouni Malinen April 15, 2024, 8:39 p.m. UTC | #1
On Thu, Apr 04, 2024 at 12:52:11PM +0200, Felix Fietkau wrote:
> Otherwise it will point at the ifindex of the just removed BSS

Thanks, all seven patches applied.
diff mbox series

Patch

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 4949de5772a7..863497e8fe86 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -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");