hostapd: fix setting the station vlan for wds stations on reauthentication
[openwrt/svn-archive/archive.git] / package / hostapd / patches / 350-wds_fix.patch
1 --- a/src/drivers/driver_nl80211.c
2 +++ b/src/drivers/driver_nl80211.c
3 @@ -4435,9 +4435,11 @@ static int i802_set_wds_sta(void *priv,
4 wpa_printf(MSG_DEBUG, "nl80211: Set WDS STA addr=" MACSTR
5 " aid=%d val=%d name=%s", MAC2STR(addr), aid, val, name);
6 if (val) {
7 - if (nl80211_create_iface(drv, name, NL80211_IFTYPE_AP_VLAN,
8 + if (!if_nametoindex(name)) {
9 + if (nl80211_create_iface(drv, name, NL80211_IFTYPE_AP_VLAN,
10 NULL, 1) < 0)
11 - return -1;
12 + return -1;
13 + }
14 linux_set_iface_flags(drv->ioctl_sock, name, 1);
15 return i802_set_sta_vlan(priv, addr, name, 0);
16 } else {