aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSimon Wunderlich <sw@simonwunderlich.de>2013-12-02 14:38:30 -0500
committerAntonio Quartulli <antonio@meshcoding.com>2013-12-28 06:51:15 -0500
commit46b76e0b8b5e21fa5a2387d6f72b193514e7f722 (patch)
treea76d23a01a35243e8700168e7fdc8d12671ab476 /net
parent6a9eadccff2926e392173a989042f14c867cffbf (diff)
batman-adv: fix alignment for batadv_coded_packet
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> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/packet.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index 207459b62966..10597a6729a6 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -315,8 +315,6 @@ struct batadv_bcast_packet {
315 */ 315 */
316}; 316};
317 317
318#pragma pack()
319
320/** 318/**
321 * struct batadv_coded_packet - network coded packet 319 * struct batadv_coded_packet - network coded packet
322 * @header: common batman packet header and ttl of first included packet 320 * @header: common batman packet header and ttl of first included packet
@@ -349,6 +347,8 @@ struct batadv_coded_packet {
349 __be16 coded_len; 347 __be16 coded_len;
350}; 348};
351 349
350#pragma pack()
351
352/** 352/**
353 * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload 353 * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload
354 * @header: common batman packet header 354 * @header: common batman packet header