Skip to content

Commit

Permalink
batman-adv: fix size of batadv_bla_claim_dst
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
  • Loading branch information
Simon Wunderlich authored and Antonio Quartulli committed Dec 28, 2013
1 parent 27a417e commit 2f7a318
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/batman-adv/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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
Expand Down

0 comments on commit 2f7a318

Please sign in to comment.