summaryrefslogtreecommitdiff
path: root/net/mac80211/mesh_hwmp.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-10-17 23:05:26 +0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-17 23:05:26 +0400
commit41ebe9cde738a972d05c7282e09f5ed54cff0e8d (patch)
tree223bf0feb7305e46989b60c3f070bef87d5fcab4 /net/mac80211/mesh_hwmp.c
parentfd38f734cb8200529e281338514945fcbff2364b (diff)
parent5c1381ac3f3f49ab1e0886ea8f1432c9a5def519 (diff)
downloadlinux-41ebe9cde738a972d05c7282e09f5ed54cff0e8d.tar.xz
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r--net/mac80211/mesh_hwmp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 6df7913d7ca4..174040a42887 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -789,11 +789,20 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
struct ieee802_11_elems elems;
size_t baselen;
u32 last_hop_metric;
+ struct sta_info *sta;
/* need action_code */
if (len < IEEE80211_MIN_ACTION_SIZE + 1)
return;
+ rcu_read_lock();
+ sta = sta_info_get(sdata, mgmt->sa);
+ if (!sta || sta->plink_state != NL80211_PLINK_ESTAB) {
+ rcu_read_unlock();
+ return;
+ }
+ rcu_read_unlock();
+
baselen = (u8 *) mgmt->u.action.u.mesh_action.variable - (u8 *) mgmt;
ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable,
len - baselen, &elems);