hostapd: fix bogus nl80211 interface remove messages for STA WDS
authorFelix Fietkau <nbd@openwrt.org>
Sat, 6 Mar 2010 18:52:22 +0000 (20:52 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Mar 2010 18:52:22 +0000 (20:52 +0200)
src/ap/sta_info.c

index 05bdc41..4f002e4 100644 (file)
@@ -121,7 +121,8 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
 
        accounting_sta_stop(hapd, sta);
 
-       hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
+       if (sta->flags & WLAN_STA_WDS)
+               hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
        if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
            !(sta->flags & WLAN_STA_PREAUTH))
                hapd->drv.sta_remove(hapd, sta->addr);