git: 1cf1f094680f - stable/13 - 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 08:07:51 UTC
The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1cf1f094680fe3bfd9836800f83ed0b79e180340 commit 1cf1f094680fe3bfd9836800f83ed0b79e180340 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 08:02:00 +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 {