mac80211: fix a race condition when bringing up wds sta interfaces on the ap

SVN-Revision: 18377
This commit is contained in:
Felix Fietkau
2009-11-11 16:32:09 +00:00
parent 3f5c35c742
commit c8c6f7ec39
2 changed files with 23 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1813,7 +1813,7 @@ static int nl80211_get_station(struct sk
}
/*
- * Get vlan interface making sure it is on the right wiphy.
+ * Get vlan interface making sure it is running and on the right wiphy.
*/
static int get_vlan(struct genl_info *info,
struct cfg80211_registered_device *rdev,
@@ -1831,6 +1831,8 @@ static int get_vlan(struct genl_info *in
return -EINVAL;
if ((*vlan)->ieee80211_ptr->wiphy != &rdev->wiphy)
return -EINVAL;
+ if (!netif_running(*vlan))
+ return -ENETDOWN;
}
return 0;
}