diff options
author | Porsch, Marco <marco.porsch@siemens.com> | 2010-02-24 03:53:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-30 15:37:23 -0400 |
commit | 533866b12cce484994163b1e201778cbac4c04c5 (patch) | |
tree | 6623b75a54f72e53da78fc2982b8486d62346aae /net/mac80211/mesh_hwmp.c | |
parent | c7a00dc73b7185ab2ebd1aa7ce710c7b4edc77a4 (diff) |
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: Marco Porsch <marco.porsch@siemens.com>
Acked-by: Javier Cardona <javier@cozybit.com>
Cc: stable@kernel.org
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index ce84237ebad3..ccff6133e19a 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -391,7 +391,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata, | |||
391 | if (SN_GT(mpath->sn, orig_sn) || | 391 | if (SN_GT(mpath->sn, orig_sn) || |
392 | (mpath->sn == orig_sn && | 392 | (mpath->sn == orig_sn && |
393 | action == MPATH_PREQ && | 393 | action == MPATH_PREQ && |
394 | new_metric > mpath->metric)) { | 394 | new_metric >= mpath->metric)) { |
395 | process = false; | 395 | process = false; |
396 | fresh_info = false; | 396 | fresh_info = false; |
397 | } | 397 | } |
@@ -611,7 +611,7 @@ static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata, | |||
611 | 611 | ||
612 | mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr, | 612 | mesh_path_sel_frame_tx(MPATH_PREP, flags, orig_addr, |
613 | cpu_to_le32(orig_sn), 0, target_addr, | 613 | cpu_to_le32(orig_sn), 0, target_addr, |
614 | cpu_to_le32(target_sn), mpath->next_hop->sta.addr, hopcount, | 614 | cpu_to_le32(target_sn), next_hop, hopcount, |
615 | ttl, cpu_to_le32(lifetime), cpu_to_le32(metric), | 615 | ttl, cpu_to_le32(lifetime), cpu_to_le32(metric), |
616 | 0, sdata); | 616 | 0, sdata); |
617 | rcu_read_unlock(); | 617 | rcu_read_unlock(); |