From patchwork Mon Sep 7 00:06:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Nicol=C3=B2_Sala?= X-Patchwork-Id: 2300961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ZCV5IR3j; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=niceo.org header.i=@niceo.org header.a=rsa-sha256 header.s=rsa header.b=KcWyZURR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hftyQ0TBgz1xvg for ; Wed, 09 Sep 2026 18:19:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DvLiB6aqadGy4HM15ptZwIXfIkwCVTLsgDIch66+nEc=; b=ZCV5IR3jTOIRM/ czov4IFjkuGuU449krQegbesUcgJ1TjpAwJ3HcCWrP3OE13xbCAZ3W803l0chD4d/E4LsV8qOyNOa sppVpgqbNkXGB14dbjpOKXDS02Trs7j3IALxtMAdnSkApP6goCqBtkFPNEdECNj6JMn9sX8ToOv2S YYy8HY2Z2SwB1zU8pOSaWJ0dUynpOjvcqzooOoD+xFuxOYwhPq1CblVTZ3JYvcJic+rh8HRPTcT9m tgwnXT8NEqY+lXvXD/zeygluEXIbsKq1E4OOOyoVWEv3L7NlGt/96TUTssz5vu2a5hpW34RwntdVU z32dvU928X0z/W7XWGCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x4DTJ-0000000B4kS-2Fro; Wed, 09 Sep 2026 08:15:57 +0000 Received: from niceo.org ([109.234.61.232]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x4DTE-0000000B4jq-3BCw for hostap@lists.infradead.org; Wed, 09 Sep 2026 08:15:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; s=rsa; d=niceo.org; c=simple/simple; r=y; h=Message-ID:Date:Subject:To:From; t=1788775609; bh=n+K62R9FAPOwLVkVXBw5nAJ 9KriijZo/y2nMJ+64fgk=; b=KcWyZURRrLEh33H5o+p1SIg5jMBziWB94dQxfbT7v9nIvQtvqr b2zTNjTE65EhFgBGPTRfuNO7bBRib7NhL/j3QCpMyVErUvDj/998pD3fBz7e+M1cyMPmNUoey+q ObELvaz19DmKcWnbS24k9dUPTd5N/5hG2dobDyNi5qFuFBjCh9JGjGkB/Og6EW1zumVHMLU8qHD DbcsxkTpJQxxHicmlkPa2DIf2ixI/zmioZ5FmDUhrekpugW+wZAkZPVW7SAWyT+Rf8vcyX1N4Ym mQukxZWx6Px7qC18uDggHhWC8mIDQ6gQZMLZscT9AYOyaG9B66yq4U6ezE/6n0SU0Tg==; From: =?utf-8?q?Nicol=C3=B2_Sala?= To: hostap@lists.infradead.org Cc: =?utf-8?q?Nicol=C3=B2_Sala?= Subject: [PATCH] nl80211: Do not attempt multicast NAN USD registration without support Date: Mon, 7 Sep 2026 12:06:12 +0200 Message-ID: <20260907100633.4163-1-me@niceo.org> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260909_011552_978663_F07264AD X-CRM114-Status: GOOD ( 15.87 ) X-Spam-Score: -0.8 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: nl80211_mgmt_subscribe_non_ap() unconditionally attempts to register for group-addressed NAN SDF Public Action frames, and falls back to a non-multicast registration if that fails. On drivers that do [...] Content analysis details: (-0.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 1.3 DATE_IN_PAST_24_48 Date: is 24 to 48 hours before Received: date -0.0 DMARC_PASS DMARC pass policy X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org nl80211_mgmt_subscribe_non_ap() unconditionally attempts to register for group-addressed NAN SDF Public Action frames, and falls back to a non-multicast registration if that fails. On drivers that do not advertise NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS the first attempt is guaranteed to fail with -EOPNOTSUPP, and the kernel returns the extended ACK message "multicast RX registrations are not supported". error_handler() prints any extack message at MSG_ERROR, so this expected and fully handled failure surfaces as an error to the user on every startup, once for the station interface and once for the P2P device interface: wlp0s20f3: nl80211: kernel reports: multicast RX registrations are not supported p2p-dev-wlp0s20: nl80211: kernel reports: multicast RX registrations are not supported Check drv->multicast_registrations before making the attempt and go straight to the non-multicast registration when the driver lacks the capability. This matches what nl80211_dpp_listen() already does and leaves behavior unchanged on drivers that do support it. Signed-off-by: Nicolò Sala --- src/drivers/driver_nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Noticed on Arch Linux after the wpa_supplicant 2.11 -> 2.12 upgrade, which started logging two error-level messages on every boot, once for the station interface and once for the P2P device interface: wlp0s20f3: nl80211: kernel reports: multicast RX registrations are not supported p2p-dev-wlp0s20: nl80211: kernel reports: multicast RX registrations are not supported The message text originates in the kernel, in nl80211_register_mgmt() (net/wireless/nl80211.c), and reaches the log through NLMSGERR_ATTR_MSG in error_handler(), which prints any extack message at MSG_ERROR. Since MSG_ERROR is the highest wpa_debug level, this cannot be filtered out from configuration without silencing genuine errors as well. Tested on a Microsoft Surface Pro 8 with an Intel Wi-Fi 6 AX201 (iwlwifi), Linux 7.2.3, wpa_supplicant 2.12. Both messages are gone with this change, and association, reconnection and P2P device setup behave as before. I kept the change local to the NAN USD call site so that it mirrors the existing drv->multicast_registrations check in nl80211_dpp_listen(). If you would prefer to address the whole class of these messages instead -- for example by not printing the extack at MSG_ERROR when the caller already handles the failure -- I am glad to send a v2. diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index d2d0a5cf0..0cc9ff95c 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -2897,7 +2897,8 @@ static int nl80211_mgmt_subscribe_non_ap(struct i802_bss *bss) #endif /* CONFIG_P2P */ #ifdef CONFIG_NAN_USD /* NAN SDF Public Action */ - if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, true) < 0) { + if (!drv->multicast_registrations || + nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, true) < 0) { /* fallback to non-multicast */ if (nl80211_register_action_frame2(bss, NAN_SDF_ACTION, 6, false) < 0)