net80211: Fix IEEE80211_KEY_UNDEFINED() in ieee80211_node_delucastkey()

The adjustment of the check in 9763fec11b inverted the logic.  Fix this.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Fixes:		9763fec11b
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
This commit is contained in:
Bjoern A. Zeeb 2025-03-05 00:02:50 +00:00
parent d70bac252d
commit 27bf5c405b

View file

@ -2206,7 +2206,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) {