Search Linux Wireless

Re: [PATCH] mac80211: fix the endianness problem of HWMP sequence number in RANN propagation

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

 



On Sat, 2012-03-17 at 02:43 +0800, Chun-Yeow Yeoh wrote:
> The HWMP sequence number of received RANN element is compared to decide whether to be
> propagated. The sequence number is required to covert from 32bit little endian data into
> CPUs endianness for comparison.
> 
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@xxxxxxxxx>
> ---
>  net/mac80211/mesh_hwmp.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
> index 1c6f3d0..2ccb3c9 100644
> --- a/net/mac80211/mesh_hwmp.c
> +++ b/net/mac80211/mesh_hwmp.c
> @@ -748,7 +748,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
>  	flags = rann->rann_flags;
>  	root_is_gate = !!(flags & RANN_FLAG_IS_GATE);
>  	orig_addr = rann->rann_addr;
> -	orig_sn = rann->rann_seq;
> +	orig_sn = le32_to_cpu(rann->rann_seq);

You should mark struct ieee80211_rann_ie to contain __le32, so that
sparse will warn about things like this.

johannes

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux