diff options
author | Javier Cardona <javier@cozybit.com> | 2011-10-06 17:54:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-11 16:41:12 -0400 |
commit | 97091317aa86955dfacf1e1b2ed55cd9e399958c (patch) | |
tree | 52289b9b7ba0d622667d5c0997adacd6b12629a1 /net/mac80211/mesh_hwmp.c | |
parent | 3d82de0fa584fbe73cf74a3bbc906c8710c523b8 (diff) |
mac80211: Fix regression that allowed mpaths between non-peers.
Mesh paths should only exist over established peer links.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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); |