[next,4/4] batman-adv: fix size of batadv_bla_claim_dst

Message ID 1386013113-25471-4-git-send-email-sw@simonwunderlich.de (mailing list archive)
State Accepted, archived
Commit 6b5c638df116b0320579ddc5e3b9b7cc894411ee
Headers

Commit Message

Simon Wunderlich Dec. 2, 2013, 7:38 p.m. UTC
  Since this is a mac address and always 48 bit, and we can assume that
it is always aligned to 2-byte boundaries, add a pack(2) pragma.

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

Comments

Marek Lindner Dec. 14, 2013, 9:43 a.m. UTC | #1
On Monday 02 December 2013 20:38:33 Simon Wunderlich wrote:
> Since this is a mac address and always 48 bit, and we can assume that
> it is always aligned to 2-byte boundaries, add a pack(2) pragma.
> 
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> ---
>  packet.h |    2 ++
>  1 file changed, 2 insertions(+)

Applied in revision 6b5c638.

Thanks,
Marek
  

Patch

diff --git a/packet.h b/packet.h
index 001b941..cc7ac9e 100644
--- a/packet.h
+++ b/packet.h
@@ -155,6 +155,7 @@  enum batadv_tvlv_type {
 	BATADV_TVLV_ROAM	= 0x05,
 };
 
+#pragma pack(2)
 /* the destination hardware field in the ARP frame is used to
  * transport the claim type and the group id
  */
@@ -163,6 +164,7 @@  struct batadv_bla_claim_dst {
 	uint8_t type;		/* bla_claimframe */
 	__be16 group;		/* group id */
 };
+#pragma pack()
 
 /**
  * struct batadv_ogm_packet - ogm (routing protocol) packet