Search Linux Wireless

[PATCH v2 13/20] mac80211: properly forward the RANN IE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Increase hopcount and convert metric to LE before forwarding the RANN
action frame.

Signed-off-by: Rui Paulo <rpaulo@xxxxxxxxx>
Signed-off-by: Javier Cardona <javier@xxxxxxxxxxx>
Reviewed-by: Andrey Yurovsky <andrey@xxxxxxxxxxx>
Tested-by: Brian Cavagnolo <brian@xxxxxxxxxxx>
---
 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 c12cf5a..355099f 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,
 	orig_addr = rann->rann_addr;
 	orig_dsn = rann->rann_seq;
 	hopcount = rann->rann_hopcount;
+	hopcount++;
 	metric = rann->rann_metric;
 	mhwmp_dbg("received RANN from %pM\n", orig_addr);
 
@@ -706,7 +707,8 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
 		mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr,
 				       cpu_to_le32(orig_dsn),
 				       0, NULL, 0, sdata->dev->broadcast,
-				       hopcount, ttl, 0, cpu_to_le32(metric),
+				       hopcount, ttl, 0,
+				       cpu_to_le32(metric + mpath->metric),
 				       0, sdata);
 		mpath->dsn = orig_dsn;
 	}
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux