Date: Sat, 3 Feb 2024 13:30:26 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 828ce22f079d - main - LinuxKPI: 802.11: fix field order in ieee80211_key_conf Message-ID: <202402031330.413DUQYO015077@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=828ce22f079df77b3bf52c4cf296959ea66bdc11 commit 828ce22f079df77b3bf52c4cf296959ea66bdc11 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-03 13:28:25 +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 MFC after: 3 days Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43635 --- 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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402031330.413DUQYO015077>