hostapd: Fix WDS VLAN bridge handling

This patch fixes an issue where removing a WDS VLAN interface also
removed the main AP interface from the same bridge.

Signed-hostap: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2012-09-15 22:38:14 -07:00 committed by Jouni Malinen
parent ce6ce7fb13
commit c34e618d47

View file

@ -7698,6 +7698,10 @@ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
}
return i802_set_sta_vlan(priv, addr, name, 0);
} else {
if (bridge_ifname)
linux_br_del_if(drv->global->ioctl_sock, bridge_ifname,
name);
i802_set_sta_vlan(priv, addr, bss->ifname, 0);
return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN,
name);
@ -8065,7 +8069,12 @@ static int wpa_driver_nl80211_if_remove(void *priv,
if (ifindex <= 0)
return -1;
nl80211_remove_iface(drv, ifindex);
#ifdef HOSTAPD
if (type != WPA_IF_AP_BSS)
return 0;
if (bss->added_if_into_bridge) {
if (linux_br_del_if(drv->global->ioctl_sock, bss->brname,
bss->ifname) < 0)
@ -8079,13 +8088,6 @@ static int wpa_driver_nl80211_if_remove(void *priv,
"bridge %s: %s",
bss->brname, strerror(errno));
}
#endif /* HOSTAPD */
nl80211_remove_iface(drv, ifindex);
#ifdef HOSTAPD
if (type != WPA_IF_AP_BSS)
return 0;
if (bss != &drv->first_bss) {
struct i802_bss *tbss;