0003-batman-adv-unaligned-access-fixes.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Tue, 23 Jan 2018 21:18:34 +0100
  3. Subject: batman-adv: unaligned access fixes
  4. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  5. diff --git a/batman-adv/patches/900-unaligned-access.patch b/batman-adv/patches/900-unaligned-access.patch
  6. new file mode 100644
  7. index 0000000000000000000000000000000000000000..ba428b683ab146773162b0956a7e3b6260c14339
  8. --- /dev/null
  9. +++ b/batman-adv/patches/900-unaligned-access.patch
  10. @@ -0,0 +1,35 @@
  11. +--- a/net/batman-adv/packet.h
  12. ++++ b/net/batman-adv/packet.h
  13. +@@ -173,8 +173,6 @@ struct batadv_bla_claim_dst {
  14. + __be16 group; /* group id */
  15. + };
  16. +
  17. +-#pragma pack()
  18. +-
  19. + /**
  20. + * struct batadv_ogm_packet - ogm (routing protocol) packet
  21. + * @packet_type: batman-adv packet type, part of the general header
  22. +@@ -382,7 +380,6 @@ struct batadv_icmp_packet_rr {
  23. + * misalignment of the payload after the ethernet header. It may also lead to
  24. + * leakage of information when the padding it not initialized before sending.
  25. + */
  26. +-#pragma pack(2)
  27. +
  28. + /**
  29. + * struct batadv_unicast_packet - unicast packet for network payload
  30. +@@ -510,8 +507,6 @@ struct batadv_coded_packet {
  31. + __be16 coded_len;
  32. + };
  33. +
  34. +-#pragma pack()
  35. +-
  36. + /**
  37. + * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload
  38. + * @packet_type: batman-adv packet type, part of the general header
  39. +@@ -618,4 +613,6 @@ struct batadv_tvlv_mcast_data {
  40. + u8 reserved[3];
  41. + };
  42. +
  43. ++#pragma pack()
  44. ++
  45. + #endif /* _NET_BATMAN_ADV_PACKET_H_ */