Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46b76e0b authored by Simon Wunderlich's avatar Simon Wunderlich Committed by Antonio Quartulli
Browse files

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: default avatarSimon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
parent 6a9eadcc
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -315,8 +315,6 @@ struct batadv_bcast_packet {
	 */
	 */
};
};


#pragma pack()

/**
/**
 * struct batadv_coded_packet - network coded packet
 * struct batadv_coded_packet - network coded packet
 * @header: common batman packet header and ttl of first included packet
 * @header: common batman packet header and ttl of first included packet
@@ -349,6 +347,8 @@ struct batadv_coded_packet {
	__be16   coded_len;
	__be16   coded_len;
};
};


#pragma pack()

/**
/**
 * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload
 * struct batadv_unicast_tvlv - generic unicast packet with tvlv payload
 * @header: common batman packet header
 * @header: common batman packet header