Skip to content

Commit

Permalink
nl80211: only allow adding stations to running vlan interfaces
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Nov 13, 2009
1 parent f501dba commit c258d2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info)
}

/*
* 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,
Expand All @@ -1839,6 +1839,8 @@ static int get_vlan(struct genl_info *info,
return -EINVAL;
if ((*vlan)->ieee80211_ptr->wiphy != &rdev->wiphy)
return -EINVAL;
if (!netif_running(*vlan))
return -ENETDOWN;
}
return 0;
}
Expand Down

0 comments on commit c258d2d

Please sign in to comment.