The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=aaee0ed3d163a1d29ea74d7e4d2c3658a51cfb27
commit aaee0ed3d163a1d29ea74d7e4d2c3658a51cfb27 Author: Bjoern A. Zeeb <b...@freebsd.org> AuthorDate: 2025-06-05 11:11:49 +0000 Commit: Bjoern A. Zeeb <b...@freebsd.org> CommitDate: 2025-06-05 11:32:27 +0000 LinuxKPI: 802.11: WEP noise While we decided that we will not provide WEP support for the LinuxKPI 802.11 compat code, some of it is in there already (also because drivers still support it). Put proper keylen checks in place as net80211 only knows about WEP while LinuxKPI has WEP40 and WEP104. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 2f9af39391f6..7520ed7331be 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1064,10 +1064,15 @@ lkpi_net80211_to_l80211_cipher_suite(uint32_t cipher, uint8_t keylen) switch (cipher) { case IEEE80211_CIPHER_WEP: - if (keylen < 8) + if (keylen == (40/NBBY)) return (WLAN_CIPHER_SUITE_WEP40); - else + else if (keylen == (104/NBBY)) return (WLAN_CIPHER_SUITE_WEP104); + else { + printf("%s: WEP with unsupported keylen %d\n", + __func__, keylen * NBBY); + return (0); + } break; case IEEE80211_CIPHER_TKIP: return (WLAN_CIPHER_SUITE_TKIP);