wifi: use struct_group to copy addresses
authorJohannes Berg <johannes.berg@intel.com>
Mon, 29 Aug 2022 09:46:38 +0000 (11:46 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 21 May 2023 21:03:28 +0000 (23:03 +0200)
We sometimes copy all the addresses from the 802.11 header
for the AAD, which may cause complaints from fortify checks.
Use struct_group() to avoid the compiler warnings/errors.

Change-Id: Ic3ea389105e7813b22095b295079eecdabde5045
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
include/linux/ieee80211.h

index 874cfde3e2c9b525640ab627e3d510ce4a1c16b1..651bafe7bd1b86616d3defedabd4ba7ef0676da2 100644 (file)
@@ -308,9 +308,11 @@ struct ieee80211_hdr {
 struct ieee80211_hdr_3addr {
        __le16 frame_control;
        __le16 duration_id;
-       u8 addr1[6];
-       u8 addr2[6];
-       u8 addr3[6];
+       struct_group(addrs,
+               u8 addr1[6];
+               u8 addr2[6];
+               u8 addr3[6];
+       );
        __le16 seq_ctrl;
 } __packed __aligned(2);