summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPorsch, Marco <marco.porsch@siemens.com>2010-02-24 09:53:13 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-26 07:47:48 -0700
commit19247cfcced8bd22953a04e7cedef591c0ea1ec4 (patch)
tree0745b7e67bc43f0bdac18d205c6379a884ffaaa2 /net
parente0db64375f23e12bbb2c43f89abc099bb61fc2f1 (diff)
downloadkernel-crypto-19247cfcced8bd22953a04e7cedef591c0ea1ec4.tar.gz
kernel-crypto-19247cfcced8bd22953a04e7cedef591c0ea1ec4.tar.xz
kernel-crypto-19247cfcced8bd22953a04e7cedef591c0ea1ec4.zip
mac80211: fix PREQ processing and one small bug
commit 533866b12cce484994163b1e201778cbac4c04c5 upstream. 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> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mesh_hwmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index d28acb6b1f8..4eed81bde1a 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,
if (SN_GT(mpath->sn, orig_sn) ||
(mpath->sn == orig_sn &&
action == MPATH_PREQ &&
- new_metric > mpath->metric)) {
+ new_metric >= mpath->metric)) {
process = false;
fresh_info = false;
}
@@ -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,
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),
0, sdata);
rcu_read_unlock();