Commit 97091317 authored by Javier Cardona's avatar Javier Cardona Committed by John W. Linville

mac80211: Fix regression that allowed mpaths between non-peers.

Mesh paths should only exist over established peer links.
Signed-off-by: default avatarJavier Cardona <javier@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3d82de0f
...@@ -789,11 +789,20 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, ...@@ -789,11 +789,20 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
struct ieee802_11_elems elems; struct ieee802_11_elems elems;
size_t baselen; size_t baselen;
u32 last_hop_metric; u32 last_hop_metric;
struct sta_info *sta;
/* need action_code */ /* need action_code */
if (len < IEEE80211_MIN_ACTION_SIZE + 1) if (len < IEEE80211_MIN_ACTION_SIZE + 1)
return; 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; baselen = (u8 *) mgmt->u.action.u.mesh_action.variable - (u8 *) mgmt;
ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable, ieee802_11_parse_elems(mgmt->u.action.u.mesh_action.variable,
len - baselen, &elems); len - baselen, &elems);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment