Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Feb 2024 21:11:06 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 826c28fa983a - stable/14 - net80211: ieee80211_dump_node() check for channel to be set
Message-ID:  <202402182111.41ILB6B9013015@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=826c28fa983a0534fba5e78b4d5d1a4ae50673f1

commit 826c28fa983a0534fba5e78b4d5d1a4ae50673f1
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-11-30 18:20:22 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2024-02-18 16:42:00 +0000

    net80211: ieee80211_dump_node() check for channel to be set
    
    Avoid panics in case ieee80211_dump_node() gets called before a
    channel context is set.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit c93be3079be5f07fe3596ec389826e45f5dc82bd)
---
 sys/net80211/ieee80211_node.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index f277293ceb14..123da34ad3f1 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -2647,7 +2647,8 @@ ieee80211_dump_node(struct ieee80211_node_table *nt __unused,
 	printf("\tbssid %s essid \"%.*s\" channel %u:0x%x\n",
 		ether_sprintf(ni->ni_bssid),
 		ni->ni_esslen, ni->ni_essid,
-		ni->ni_chan->ic_freq, ni->ni_chan->ic_flags);
+		(ni->ni_chan != IEEE80211_CHAN_ANYC) ? ni->ni_chan->ic_freq : 0,
+		(ni->ni_chan != IEEE80211_CHAN_ANYC) ? ni->ni_chan->ic_flags : 0);
 	printf("\tinact %u inact_reload %u txrate %u\n",
 		ni->ni_inact, ni->ni_inact_reload, ni->ni_txrate);
 	printf("\thtcap %x htparam %x htctlchan %u ht2ndchan %u\n",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402182111.41ILB6B9013015>