The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=897906f49ef2e7497db295a978e5aac40e3e02aa
commit 897906f49ef2e7497db295a978e5aac40e3e02aa 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-10 23:38:31 +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 (cherry picked from commit aaee0ed3d163a1d29ea74d7e4d2c3658a51cfb27) --- 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 5653bc2ffba2..89c067409774 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);