b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH-next 1/4] batman-adv: fix alignment for batadv_coded_packet
@ 2013-12-02 19:38 Simon Wunderlich
  2013-12-02 19:38 ` [B.A.T.M.A.N.] [PATCH-next 2/4] batman-adv: fix header alignment by unrolling batadv_header Simon Wunderlich
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Simon Wunderlich @ 2013-12-02 19:38 UTC (permalink / raw)
  To: b.a.t.m.a.n

The compiler may decide to pad the structure, and then it does not
have the expected size of 46 byte. Fix this by moving it in the
pragma pack(2) part of the code.

Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 packet.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packet.h b/packet.h
index 207459b..10597a6 100644
--- a/packet.h
+++ b/packet.h
@@ -315,8 +315,6 @@ struct batadv_bcast_packet {
 	 */
 };
 
-#pragma pack()
-
 /**
  * struct batadv_coded_packet - network coded packet
  * @header: common batman packet header and ttl of first included packet
@@ -349,6 +347,8 @@ struct batadv_coded_packet {
 	__be16   coded_len;
 };
 
+#pragma pack()
+
 /**
  * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload
  * @header: common batman packet header
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-12-15 15:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 19:38 [B.A.T.M.A.N.] [PATCH-next 1/4] batman-adv: fix alignment for batadv_coded_packet Simon Wunderlich
2013-12-02 19:38 ` [B.A.T.M.A.N.] [PATCH-next 2/4] batman-adv: fix header alignment by unrolling batadv_header Simon Wunderlich
2013-12-12  5:44   ` Marek Lindner
2013-12-02 19:38 ` [B.A.T.M.A.N.] [PATCH-next 3/4] batman-adv: fix size of batadv_icmp_header Simon Wunderlich
2013-12-02 20:16   ` Antonio Quartulli
2013-12-03 10:54     ` Simon Wunderlich
2013-12-05  1:00       ` Antonio Quartulli
2013-12-05 14:20         ` [B.A.T.M.A.N.] [PATCHv2 next " Antonio Quartulli
2013-12-05 14:30           ` Antonio Quartulli
2013-12-02 19:38 ` [B.A.T.M.A.N.] [PATCH-next 4/4] batman-adv: fix size of batadv_bla_claim_dst Simon Wunderlich
2013-12-14  9:43   ` Marek Lindner
2013-12-12  5:42 ` [B.A.T.M.A.N.] [PATCH-next 1/4] batman-adv: fix alignment for batadv_coded_packet Marek Lindner
2013-12-15 15:38 ` Antonio Quartulli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).