summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-11 16:32:09 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-11-11 16:32:09 +0000
commit9afd422632c0bbe4d7d7ea324f9410cb67948551 (patch)
tree43c738de080f62db846d8ea87331ef9cf6a65341
parent35dc8491f05d1b3ef7252f2b73fd986cab687630 (diff)
mac80211: fix a race condition when bringing up wds sta interfaces on the ap
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18377 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/hostapd/patches/130-wds_ap.patch5
-rw-r--r--package/mac80211/patches/520-nl80211_vlan_add_fix.patch20
2 files changed, 23 insertions, 2 deletions
diff --git a/package/hostapd/patches/130-wds_ap.patch b/package/hostapd/patches/130-wds_ap.patch
index 019257599..4624f88a1 100644
--- a/package/hostapd/patches/130-wds_ap.patch
+++ b/package/hostapd/patches/130-wds_ap.patch
@@ -126,7 +126,7 @@
return -1;
return 0;
}
-@@ -4310,6 +4312,21 @@ static int i802_set_sta_vlan(void *priv,
+@@ -4310,6 +4312,22 @@ static int i802_set_sta_vlan(void *priv,
return -ENOBUFS;
}
@@ -139,6 +139,7 @@
+ if (val) {
+ if (nl80211_create_iface(priv, name, NL80211_IFTYPE_AP_VLAN, NULL, 1) < 0)
+ return -1;
++ hostapd_set_iface_flags(drv, name, 1);
+ return i802_set_sta_vlan(priv, addr, name, 0);
+ } else {
+ i802_set_sta_vlan(priv, addr, drv->ifname, 0);
@@ -148,7 +149,7 @@
static void handle_eapol(int sock, void *eloop_ctx, void *sock_ctx)
{
-@@ -4536,5 +4553,6 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -4536,5 +4554,6 @@ const struct wpa_driver_ops wpa_driver_n
.if_update = i802_if_update,
.if_remove = i802_if_remove,
.set_sta_vlan = i802_set_sta_vlan,
diff --git a/package/mac80211/patches/520-nl80211_vlan_add_fix.patch b/package/mac80211/patches/520-nl80211_vlan_add_fix.patch
new file mode 100644
index 000000000..e0cdaead1
--- /dev/null
+++ b/package/mac80211/patches/520-nl80211_vlan_add_fix.patch
@@ -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;
+ }