]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Remove AP MLD links while removing the interface
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Wed, 6 Mar 2024 06:39:14 +0000 (12:09 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 27 Mar 2024 16:12:39 +0000 (18:12 +0200)
When the interface was removed, the added links were not removed. While
removing the interface, kernel has removed the stale links but hostapd
has not. This is wrong since hostapd should remove and do the clean ups
properly while removing the interface.

Hence, remove the links when interface is removed.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
src/drivers/driver_nl80211.c

index e4695d0b2df8d48de12410bbd119e5d47a80b56c..a9edf66ef06d8c255f3ac4a14366c604be085854 100644 (file)
@@ -8965,6 +8965,7 @@ static int wpa_driver_nl80211_if_remove(struct i802_bss *bss,
                                tbss->next = bss->next;
                                /* Unsubscribe management frames */
                                nl80211_teardown_ap(bss);
+                               nl80211_remove_links(bss);
                                nl80211_destroy_bss(bss);
                                if (!bss->added_if)
                                        i802_set_iface_flags(bss, 0);
@@ -8979,6 +8980,7 @@ static int wpa_driver_nl80211_if_remove(struct i802_bss *bss,
        } else {
                wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
                nl80211_teardown_ap(bss);
+               nl80211_remove_links(bss);
                if (!bss->added_if && !drv->first_bss->next)
                        wpa_driver_nl80211_del_beacon_all(bss);
                nl80211_destroy_bss(bss);