Commit 533866b1 authored by Porsch, Marco's avatar Porsch, Marco Committed by John W. Linville

mac80211: fix PREQ processing and one small bug

1st) a PREQ should only be processed, if it has the same SN and better
metric (instead of better or equal).
2nd) next_hop[ETH_ALEN] now actually used to buffer
mpath->next_hop->sta.addr for use out of lock.
Signed-off-by: default avatarMarco Porsch <marco.porsch@siemens.com>
Acked-by: default avatarJavier Cardona <javier@cozybit.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c7a00dc7
...@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, ...@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
if (SN_GT(mpath->sn, orig_sn) || if (SN_GT(mpath->sn, orig_sn) ||
(mpath->sn == orig_sn && (mpath->sn == orig_sn &&
action == MPATH_PREQ && action == MPATH_PREQ &&
new_metric > mpath->metric)) { new_metric >= mpath->metric)) {
process = false; process = false;
fresh_info = false; fresh_info = false;
} }
...@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, ...@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr, mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr,
cpu_to_le32(orig_sn), 0, target_addr, cpu_to_le32(orig_sn), 0, target_addr,
cpu_to_le32(target_sn), mpath->next_hop->sta.addr, hopcount, cpu_to_le32(target_sn), next_hop, hopcount,
ttl, cpu_to_le32(lifetime), cpu_to_le32(metric), ttl, cpu_to_le32(lifetime), cpu_to_le32(metric),
0, sdata); 0, sdata);
rcu_read_unlock(); rcu_read_unlock();
......
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