git: 5463d4cd99f3 - releng/13.3 - LinuxKPI: 802.11: fix field order in ieee80211_key_conf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 19 Feb 2024 16:10:19 UTC
The branch releng/13.3 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5463d4cd99f339f7ed40a70679f48eb31f2b819e commit 5463d4cd99f339f7ed40a70679f48eb31f2b819e Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-01-28 00:51:23 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-02-19 16:06:59 +0000 LinuxKPI: 802.11: fix field order in ieee80211_key_conf When adding the new field link_id to struct ieee80211_key_conf, it was erroneously placed at the end of the struct; the zero-length (variable sized) array for the key always needs to stay last. Resort fields and add hopefully helpful comment to avoid the problem in the future. Approved by: re (cperciva) Fixes: adff403fe7a87 Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43635 (cherry picked from commit 828ce22f079df77b3bf52c4cf296959ea66bdc11) (cherry picked from commit 1cf1f094680fe3bfd9836800f83ed0b79e180340) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fee29d3b1a1d..f6d807263cef 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -507,9 +507,9 @@ struct ieee80211_key_conf { uint8_t hw_key_idx; /* Set by drv. */ uint8_t keyidx; uint16_t flags; - uint8_t keylen; - uint8_t key[0]; int8_t link_id; /* signed! */ + uint8_t keylen; + uint8_t key[0]; /* Must stay last! */ }; struct ieee80211_key_seq {