From nobody Thu Nov 30 18:22:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sh4L00KWXz52PDN; Thu, 30 Nov 2023 18:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sh4Kz6XLqz3DPG; Thu, 30 Nov 2023 18:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701368551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2uNsjkyN+oULCO1uL/XlkyjIvW3yZ5YvymZaxwNKKc=; b=vUYC6oxwMsKRoADmhBdXlUOcupkKijAV4XWOCFo9LLSFvsZP+rBg5aOvFJQL7VSSFRjJGD Rt5Cw6vbEdJZYlaDfC96gaelVkgXCMu9UPYaB4wxvnIAoZxVp7slmvs7wiveuf9TM8exl+ nTjbsaHeiaVwa+RZH/ZTnPODyf7aseWMZA1OFvzoC4dFZOxr+qH/dswFyBqnLrLk+69h6Q 0codFeANYJayFs8H1OV+9XFztWbpIniXfytKG0UJojOCRz06ujIzQEKbtl6thrHRdgy6F+ zjQhEWeHdOVTRhlH8lJvm0beqa0fttfDi+8eXZjlVOlBhgqD50pNcubicjMRew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701368551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I2uNsjkyN+oULCO1uL/XlkyjIvW3yZ5YvymZaxwNKKc=; b=Gohcg1PP8jK6dlpWkd2iRn8FjYQNcQ6ozuAtOui5pxyVFSN9hurQtb8TMbt4Ydb5M6A3zo H+D2QaDbVK8VGWusN8KeA+2shfsA2PbwugC+wOEdQsuF6bRaCARERIIT9ZAhv6CG4xwJAd rHRHPLI+SlJE/h2FNbV0ls/9X5NkB35AIbuSryyKkaQP4xrHO8lQ6LQvi9Ys5yOwpJQWhk lM3nYDH5iDOOtUkKTCOj6ggZJ8T7e8rUTPnIYHx9oRHbyCpM2mEMt9GbJ2K+5q8PH227me iKpCkRDRMvjx195PUjfIUUIhPP2Zhr3xMtgw20OlusV2VTujBlcoTtKmuW5v1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701368551; a=rsa-sha256; cv=none; b=YHTT8lSeQJrgqnSFqIS4rLb10HOWRwj6GRCBuNW2iHCHxtvvKx3LLR/Ot4oWvL5azPScep z0eSbO9uWk9PJOeegt4+lHE4GYuOVSvq9evQYzf95NcZPYvLAZrw1OQea1kQhyjg/Tuzie FnYH2PDGhMJaWR0GPjoKXQJvUFw7J9s2c2D7dl5q1SjzvcsZ9EouvL7Q+KjDA9Srq9XcYk JRRwfrukKeX/cBf2+sp3KtOaSCaVBH3gxzRySu/U3wzMKmufvVnOKr6bBqKjuM/4N+qcsE McRR48KS/fBGWZW3hhIcVJ+H8mgCvQUcEghAVdPZYIN9mEpAOtFmIYXxOR2Klw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sh4Kz5bNrz10wS; Thu, 30 Nov 2023 18:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AUIMVQE039113; Thu, 30 Nov 2023 18:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AUIMVJW039110; Thu, 30 Nov 2023 18:22:31 GMT (envelope-from git) Date: Thu, 30 Nov 2023 18:22:31 GMT Message-Id: <202311301822.3AUIMVJW039110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c93be3079be5 - main - net80211: ieee80211_dump_node() check for channel to be set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c93be3079be5f07fe3596ec389826e45f5dc82bd Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c93be3079be5f07fe3596ec389826e45f5dc82bd commit c93be3079be5f07fe3596ec389826e45f5dc82bd Author: Bjoern A. Zeeb AuthorDate: 2023-11-30 18:20:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-30 18:21:49 +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 MFC after: 3 days --- 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",