Commit a6a58b4f authored by Rui Paulo's avatar Rui Paulo Committed by John W. Linville

mac80211: properly forward the RANN IE

Increase hopcount and convert metric to LE before forwarding the RANN
action frame.
Signed-off-by: default avatarRui Paulo <rpaulo@gmail.com>
Signed-off-by: default avatarJavier Cardona <javier@cozybit.com>
Reviewed-by: default avatarAndrey Yurovsky <andrey@cozybit.com>
Tested-by: default avatarBrian Cavagnolo <brian@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d611f062
...@@ -686,6 +686,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, ...@@ -686,6 +686,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
orig_addr = rann->rann_addr; orig_addr = rann->rann_addr;
orig_dsn = rann->rann_seq; orig_dsn = rann->rann_seq;
hopcount = rann->rann_hopcount; hopcount = rann->rann_hopcount;
hopcount++;
metric = rann->rann_metric; metric = rann->rann_metric;
mhwmp_dbg("received RANN from %pM\n", orig_addr); 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, ...@@ -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, mesh_path_sel_frame_tx(MPATH_RANN, flags, orig_addr,
cpu_to_le32(orig_dsn), cpu_to_le32(orig_dsn),
0, NULL, 0, sdata->dev->broadcast, 0, NULL, 0, sdata->dev->broadcast,
hopcount, ttl, 0, cpu_to_le32(metric), hopcount, ttl, 0,
cpu_to_le32(metric + mpath->metric),
0, sdata); 0, sdata);
mpath->dsn = orig_dsn; mpath->dsn = orig_dsn;
} }
......
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