git: f966ed85ac95 - stable/14 - net80211: Fix IEEE80211_KEY_UNDEFINED() in ieee80211_node_delucastkey()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Mar 2025 22:27:05 UTC
The branch stable/14 has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=f966ed85ac954bfe89652eb8bce7115a9207fc82
commit f966ed85ac954bfe89652eb8bce7115a9207fc82
Author: Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-03-05 00:02:50 +0000
Commit: Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-03-19 22:22:15 +0000
net80211: Fix IEEE80211_KEY_UNDEFINED() in ieee80211_node_delucastkey()
The adjustment of the check in 9763fec11b83 inverted the logic. Fix this.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: 9763fec11b83
Reported by: KUROSAWA Takahiro (takahiro.kurosawa gmail.com) in D48980
Reviewed by: KUROSAWA Takahiro (takahiro.kurosawa gmail.com), adrian
Differential Revision: https://reviews.freebsd.org/D49234
(cherry picked from commit 27bf5c405bf2eb69392e45c06605defc78882612)
---
sys/net80211/ieee80211_node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index f2fc3d21a361..ae22dc036bb6 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -2209,7 +2209,7 @@ ieee80211_node_delucastkey(struct ieee80211_node *ni)
IEEE80211_NODE_LOCK(nt);
nikey = NULL;
status = 1; /* NB: success */
- if (IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) {
+ if (!IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) {
keyix = ni->ni_ucastkey.wk_rxkeyix;
status = ieee80211_crypto_delkey(ni->ni_vap, &ni->ni_ucastkey);
if (nt->nt_keyixmap != NULL && keyix < nt->nt_keyixmax) {