From: Matthias Schiffer Date: Tue, 23 Jan 2018 21:18:34 +0100 Subject: batman-adv: unaligned access fixes Signed-off-by: Matthias Schiffer diff --git a/batman-adv/patches/900-unaligned-access.patch b/batman-adv/patches/900-unaligned-access.patch new file mode 100644 index 0000000000000000000000000000000000000000..ba428b683ab146773162b0956a7e3b6260c14339 --- /dev/null +++ b/batman-adv/patches/900-unaligned-access.patch @@ -0,0 +1,35 @@ +--- a/net/batman-adv/packet.h ++++ b/net/batman-adv/packet.h +@@ -173,8 +173,6 @@ struct batadv_bla_claim_dst { + __be16 group; /* group id */ + }; + +-#pragma pack() +- + /** + * struct batadv_ogm_packet - ogm (routing protocol) packet + * @packet_type: batman-adv packet type, part of the general header +@@ -382,7 +380,6 @@ struct batadv_icmp_packet_rr { + * misalignment of the payload after the ethernet header. It may also lead to + * leakage of information when the padding it not initialized before sending. + */ +-#pragma pack(2) + + /** + * struct batadv_unicast_packet - unicast packet for network payload +@@ -510,8 +507,6 @@ struct batadv_coded_packet { + __be16 coded_len; + }; + +-#pragma pack() +- + /** + * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload + * @packet_type: batman-adv packet type, part of the general header +@@ -618,4 +613,6 @@ struct batadv_tvlv_mcast_data { + u8 reserved[3]; + }; + ++#pragma pack() ++ + #endif /* _NET_BATMAN_ADV_PACKET_H_ */