From patchwork Wed Dec 13 14:04:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1875668 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=LYJw2g84; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=e0ov9Rj4; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) 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 4Sqy1V6zWlz20H6 for ; Thu, 14 Dec 2023 01:05:34 +1100 (AEDT) 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=8UHop8xZ68Z85E7afdAOIxbBXBISMJgrkQ0FohkbLZI=; b=LYJw2g84V/+Zfg hOhUqJ9w+fDt1YLUyF4KVH54pSKwBf6tcSiofzuKmw/zG7p8EQYD+hCKRMENGch+UAN1q+aQ+yLyt /pAUV/bZCbVpsYTaf2H1L8NxK4sK9YFpEzhBnTjyP06mnwnb+gLFB3w/ucNAxb6+jGHzm23jAy23X p/3EOXa8va3xtXMF/jOZerqfzC1ceiCRXl9hx5CS7JRNRsmmmLkPeXD+W/ShsmzXCVnCEgZn1ab44 kNXa04b9LEoN3d+uRWrK/pepDazEdw5WL049ZKyuzvStxvMo86iZhomkdHo2VDfQ1pSkL/v+p2+cC 0AF2ZXgQE1fK3Jq5rxzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDPr9-00Ex9I-2Q; Wed, 13 Dec 2023 14:04:59 +0000 Received: from mgamail.intel.com ([198.175.65.11]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDPr6-00Ex30-0z for hostap@lists.infradead.org; Wed, 13 Dec 2023 14:04:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702476296; x=1734012296; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OVUwPzQ5UoH3i0la2xXvQsvrZvUf2/Nvl73c4rd0w38=; b=e0ov9Rj4igowSkqxM5xchRo6oboAKv16BCIKjheXTRGpYETkyZfrlq3U FZwXvJ8eoHrOSmkID1kHjAKnZNoMN2qYUw+dP7oUaPcsycOO2eViE5Jrb GHOKdLfRqTVkXgOnRCO5pDHOp2zqIU4ijgJglUKDnijNUkx2W3kHUCuCk hqTPQnRj3/2wMpEQUYiOrCfUJSKY+vCVq0Y7xkoMTfaUEA36YPXHX9x0u SUJ3fGgusodQl/8TQ2Xsf0f8WuNcDLCAo5JEedHbWF59Xnuz3aFZP1qY2 3y3OgwjSu3agVajEaaR24D898gYUd+rGZ3/Ws/9fgxnIasRvhKMJQ8klt w==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="1808178" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="1808178" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 06:04:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="723660029" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="723660029" Received: from mwaksma1-mobl1.ger.corp.intel.com (HELO localhost.localdomain) ([10.254.159.208]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 06:04:51 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 4/8] AP: When sending action frames, use MLD address if needed Date: Wed, 13 Dec 2023 16:04:08 +0200 Message-Id: <20231213140412.326465-4-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_060456_398718_DFB1CD39 X-CRM114-Status: GOOD ( 12.56 ) X-Spam-Score: -0.4 (/) 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: From: Ilan Peer When the AP sends an action frame to an MLO station, use the AP mld address instead of the local AP address. Signed-off-by: Ilan Peer --- src/ap/ap_drv_ops.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) Content analysis details: (-0.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 From: Ilan Peer When the AP sends an action frame to an MLO station, use the AP mld address instead of the local AP address. Signed-off-by: Ilan Peer --- src/ap/ap_drv_ops.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c index fd0f97748e..2a546daff7 100644 --- a/src/ap/ap_drv_ops.c +++ b/src/ap/ap_drv_ops.c @@ -886,17 +886,18 @@ int hostapd_drv_send_action(struct hostapd_data *hapd, unsigned int freq, unsigned int wait, const u8 *dst, const u8 *data, size_t len) { + const u8 *own_addr = hapd->own_addr; const u8 *bssid; const u8 wildcard_bssid[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + struct sta_info *sta; if (!hapd->driver || !hapd->driver->send_action || !hapd->drv_priv) return 0; bssid = hapd->own_addr; if (!is_multicast_ether_addr(dst) && len > 0 && data[0] == WLAN_ACTION_PUBLIC) { - struct sta_info *sta; /* * Public Action frames to a STA that is not a member of the BSS @@ -914,9 +915,19 @@ int hostapd_drv_send_action(struct hostapd_data *hapd, unsigned int freq, * so have to use the wildcard BSSID value. */ bssid = wildcard_bssid; +#ifdef CONFIG_IEEE80211BE + } else if (hapd->conf->mld_ap) { + sta = ap_get_sta(hapd, dst); + + if (sta && sta->mld_info.mld_sta) { + own_addr = hapd->mld_addr; + bssid = own_addr; + } +#endif /* CONFIG_IEEE80211BE */ } + return hapd->driver->send_action(hapd->drv_priv, freq, wait, dst, - hapd->own_addr, bssid, data, len, 0); + own_addr, bssid, data, len, 0); }