git: 46c1c9fafac2 - stable/14 - LinuxKPI: 802.11: fix field order in ieee80211_key_conf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 18 Feb 2024 21:11:22 UTC
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=46c1c9fafac25e1fcb41afecd2143c1e023ff8a0 commit 46c1c9fafac25e1fcb41afecd2143c1e023ff8a0 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-18 18:31:15 +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. Fixes: adff403fe7a87 Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43635 (cherry picked from commit 828ce22f079df77b3bf52c4cf296959ea66bdc11) --- 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 c4d001b3a7e8..293b6868cd50 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -510,9 +510,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 {