diff options
author | Rui Paulo <rpaulo@gmail.com> | 2009-11-09 18:46:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-13 17:43:55 -0500 |
commit | a6a58b4f14106e61e5d78aac7995686ed0d5eab8 (patch) | |
tree | 17ea8b8a5248246b40110390260b752b826e0913 /net/mac80211/mesh_hwmp.c | |
parent | d611f062f4351d8609910648854908fecf58970d (diff) |
mac80211: properly forward the RANN IE
Increase hopcount and convert metric to LE before forwarding the RANN
action frame.
Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index eb4180bff575..7d36f3a741a5 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -686,6 +686,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, | |||
686 | orig_addr = rann->rann_addr; | 686 | orig_addr = rann->rann_addr; |
687 | orig_dsn = rann->rann_seq; | 687 | orig_dsn = rann->rann_seq; |
688 | hopcount = rann->rann_hopcount; | 688 | hopcount = rann->rann_hopcount; |
689 | hopcount++; | ||
689 | metric = rann->rann_metric; | 690 | metric = rann->rann_metric; |
690 | mhwmp_dbg("received RANN from %pM\n", orig_addr); | 691 | mhwmp_dbg("received RANN from %pM\n", orig_addr); |
691 | 692 | ||
@@ -706,7 +707,8 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, | |||
706 | mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr, | 707 | mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr, |
707 | cpu_to_le32(orig_dsn), | 708 | cpu_to_le32(orig_dsn), |
708 | 0, NULL, 0, sdata->dev->broadcast, | 709 | 0, NULL, 0, sdata->dev->broadcast, |
709 | hopcount, ttl, 0, cpu_to_le32(metric), | 710 | hopcount, ttl, 0, |
711 | cpu_to_le32(metric + mpath->metric), | ||
710 | 0, sdata); | 712 | 0, sdata); |
711 | mpath->dsn = orig_dsn; | 713 | mpath->dsn = orig_dsn; |
712 | } | 714 | } |