* [B.A.T.M.A.N.] [PATCH] batman-adv: correctly align the tt_tvlv_data struct
@ 2013-05-24 13:04 Antonio Quartulli
2013-05-28 6:59 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2013-05-24 13:04 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
4bytes long members must start at an address multiple of 4
in order to avoid unaligned memory access.
Add 2 padding bytes to satisfy this requirement.
Introduced by c5e7a06a29612056006e4dc01910c0b44e858583
"batman-adv: use CRC32C instead of CRC16 in TT code"
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
packet.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/packet.h b/packet.h
index 21254a4..8675b52 100644
--- a/packet.h
+++ b/packet.h
@@ -391,11 +391,13 @@ struct batadv_tvlv_gateway_data {
* struct batadv_tvlv_tt_data - tt data propagated through the tt tvlv container
* @flags: translation table flags (see batadv_tt_data_flags)
* @ttvn: translation table version number
+ * @reserved: not used, useful for alignment purposes
* @crc: crc32 checksum of the local translation table
*/
struct batadv_tvlv_tt_data {
uint8_t flags;
uint8_t ttvn;
+ uint16_t reserved;
__be32 crc;
};
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: correctly align the tt_tvlv_data struct
2013-05-24 13:04 [B.A.T.M.A.N.] [PATCH] batman-adv: correctly align the tt_tvlv_data struct Antonio Quartulli
@ 2013-05-28 6:59 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-05-28 6:59 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
On Friday, May 24, 2013 21:04:44 Antonio Quartulli wrote:
> 4bytes long members must start at an address multiple of 4
> in order to avoid unaligned memory access.
>
> Add 2 padding bytes to satisfy this requirement.
>
> Introduced by c5e7a06a29612056006e4dc01910c0b44e858583
> "batman-adv: use CRC32C instead of CRC16 in TT code"
>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
> packet.h | 2 ++
> 1 file changed, 2 insertions(+)
Applied in revision 2fb072a.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-28 6:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-24 13:04 [B.A.T.M.A.N.] [PATCH] batman-adv: correctly align the tt_tvlv_data struct Antonio Quartulli
2013-05-28 6:59 ` Marek Lindner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.