All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nl80211: only allow adding stations to running vlan interfaces
@ 2009-11-11 16:23 Felix Fietkau
  0 siblings, 0 replies; only message in thread
From: Felix Fietkau @ 2009-11-11 16:23 UTC (permalink / raw)
  To: linux-wireless; +Cc: John W. Linville, Johannes Berg

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---

--- 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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-11 16:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11 16:23 [PATCH] nl80211: only allow adding stations to running vlan interfaces Felix Fietkau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.