2012-04-09 07:47:07

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: [PATCH] mac80211: fix the assignment of PREQ's MAC address for Proactive RANN

The individually addressed PREQ to the root mesh STA should be sent to the
neighbor peer mesh STA which the RANN generated by that neighbor peer mesh
STA is accepted.

Signed-off-by: Chun-Yeow Yeoh <[email protected]>
---
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 1c6f3d0..5b338c0 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -788,10 +788,10 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
cpu_to_le32(metric + mpath->metric),
0, sdata);
mpath->sn = orig_sn;
+ /* Using individually addressed PREQ for root node */
+ memcpy(mpath->rann_snd_addr, mgmt->sa, ETH_ALEN);
}

- /* Using individually addressed PREQ for root node */
- memcpy(mpath->rann_snd_addr, mgmt->sa, ETH_ALEN);
mpath->is_root = true;

if (root_is_gate)
--
1.7.0.4



2012-04-10 01:48:18

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of PREQ's MAC address for Proactive RANN

Hi, Javier

> 1. I would suggest rewording the description. ?Maybe something like:
>
> "Record the RANN sender's address only for RANNs that meet the
> acceptance criteria (per sections 13.10.12.4.2)."

Noted, your description is clearer.

> 2. Also, to properly review the patch, I had to find your earlier
> patch (http://lists.open80211s.org/pipermail/devel/2012-March/003113.html)
> that's still in John's queue. ?Maybe merge the two patches and
> resubmit?

I have found out that the previous patches are merged upstream 5 hours ago.

> 3. Before your patch, the address in rann_snd_addr was always valid if
> mpath->is_root == true. ?This is why elsewhere in the code you could
> safely do things like:
>
> da = (mpath && mpath->is_root) ? mpath->rann_snd_addr : broadcast_addr;
>
> This is no longer the case, at least not evidently. ?Can you double
> check that the possibility where mpath->is_root == true and
> mpath->rann_snd_addr is uninitialized is correctly addressed? ?Maybe
> by initializing mpath->rann_snd_addr to be the broadcast address?
>

Ok, I will take a look on this. Perhaps, adding it on the mesh_path_add routine.

> 4. The comment ?/* Using individually addressed PREQ for root node */
> does not make sense there. ?I think it's ok to remove, or reword as /*
> Recording RANNs sender address to send individually addressed PREQs
> destined for root node */

Noted.

Regards,
Chun-Yeow

2012-04-09 18:30:23

by Javier Cardona

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix the assignment of PREQ's MAC address for Proactive RANN

Hi Yeoh,

On Mon, Apr 9, 2012 at 12:46 AM, Chun-Yeow Yeoh <[email protected]> wrote:
> The individually addressed PREQ to the root mesh STA should be sent to the
> neighbor peer mesh STA which the RANN generated by that neighbor peer mesh
> STA is accepted.

1. I would suggest rewording the description. Maybe something like:

"Record the RANN sender's address only for RANNs that meet the
acceptance criteria (per sections 13.10.12.4.2)."

2. Also, to properly review the patch, I had to find your earlier
patch (http://lists.open80211s.org/pipermail/devel/2012-March/003113.html)
that's still in John's queue. Maybe merge the two patches and
resubmit?

3. Before your patch, the address in rann_snd_addr was always valid if
mpath->is_root == true. This is why elsewhere in the code you could
safely do things like:

da = (mpath && mpath->is_root) ? mpath->rann_snd_addr : broadcast_addr;

This is no longer the case, at least not evidently. Can you double
check that the possibility where mpath->is_root == true and
mpath->rann_snd_addr is uninitialized is correctly addressed? Maybe
by initializing mpath->rann_snd_addr to be the broadcast address?

4. The comment /* Using individually addressed PREQ for root node */
does not make sense there. I think it's ok to remove, or reword as /*
Recording RANNs sender address to send individually addressed PREQs
destined for root node */

Thanks!

Javier

> Signed-off-by: Chun-Yeow Yeoh <[email protected]>
> ---
> ?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 1c6f3d0..5b338c0 100644
> --- a/net/mac80211/mesh_hwmp.c
> +++ b/net/mac80211/mesh_hwmp.c
> @@ -788,10 +788,10 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cpu_to_le32(metric + mpath->metric),
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0, sdata);
> ? ? ? ? ? ? ? ?mpath->sn = orig_sn;
> + ? ? ? ? ? ? ? /* Using individually addressed PREQ for root node */
> + ? ? ? ? ? ? ? memcpy(mpath->rann_snd_addr, mgmt->sa, ETH_ALEN);
> ? ? ? ?}
>
> - ? ? ? /* Using individually addressed PREQ for root node */
> - ? ? ? memcpy(mpath->rann_snd_addr, mgmt->sa, ETH_ALEN);
> ? ? ? ?mpath->is_root = true;
>
> ? ? ? ?if (root_is_gate)
> --
> 1.7.0.4
>



--
Javier Cardona
cozybit Inc.
http://www.cozybit.com