diff options
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 9 |
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, | |||
789 | struct ieee802_11_elems elems; | 789 | struct ieee802_11_elems elems; |
790 | size_t baselen; | 790 | size_t baselen; |
791 | u32 last_hop_metric; | 791 | u32 last_hop_metric; |
792 | struct sta_info *sta; | ||
792 | 793 | ||
793 | /* need action_code */ | 794 | /* need action_code */ |
794 | if (len < IEEE80211_MIN_ACTION_SIZE + 1) | 795 | if (len < IEEE80211_MIN_ACTION_SIZE + 1) |
795 | return; | 796 | return; |
796 | 797 | ||
798 | rcu_read_lock(); | ||
799 | sta = sta_info_get(sdata, mgmt->sa); | ||
800 | if (!sta || sta->plink_state != NL80211_PLINK_ESTAB) { | ||
801 | rcu_read_unlock(); | ||
802 | return; | ||
803 | } | ||
804 | rcu_read_unlock(); | ||
805 | |||
797 | baselen = (u8 *) mgmt->u.action.u.mesh_action.variable - (u8 *) mgmt; | 806 | baselen = (u8 *) mgmt->u.action.u.mesh_action.variable - (u8 *) mgmt; |
798 | ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable, | 807 | ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable, |
799 | len - baselen, &elems); | 808 | len - baselen, &elems); |