From patchwork Wed Apr 17 04:27:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Kumar Singh X-Patchwork-Id: 1924490 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=ggPUl4OU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=VBxvHw/J; 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 4VK7G70tjkz1yYB for ; Wed, 17 Apr 2024 14:29:03 +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:References:In-Reply-To: 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: List-Owner; bh=ir0HDhkWWwIQRZIW+YE9CtvP8kl4qJv2CYhtbaC5aAE=; b=ggPUl4OUcR2ORt jrXrm2yUumbTNhPtMUb4c4egUOpoTlAQQU/jg8I2RaLyRhgGGfuPI2YTrRvtuemlEilpKz1K8UBBZ Wc3QfvCjugVHTY80bpaZYDRmTjz466rw9/UyP4LixwThWWC93shP+j4UUIjNnwQFGFYuJcHxHIVjf HI7CiGFXSXLujgXtIZYoSj9hyVnL71U7vFpM8za3Nx+BoEakR+T7LQxW2xKHntMijVSKws/t/5I8l f2VvQbAosCd4kmSZzbkyi6zcsn50GBLesxg44EdEu/s4qhgJMQZqRHrq4w8VnI58ymu12zbiKQ0Ay XDJojpaa04vbRGYXj15g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwwu5-0000000Efvb-3oEJ; Wed, 17 Apr 2024 04:28:13 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwwu1-0000000EfvB-12uW for hostap@lists.infradead.org; Wed, 17 Apr 2024 04:28:10 +0000 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43H43ICv018705 for ; Wed, 17 Apr 2024 04:28:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=nYcDNvlLVnjUcOR8NALO4hbOCdRNRQIQ88gxbf/hzfA=; b=VB xvHw/JDrLfKidTgiDxEBD44JGGQO61Lis9E9XW6vGJbjJcIQ1bcpfKp8B4s58r9T MuglBjA0N9LK5lHgTZG/2wj0VeMWEaZSmMSpjbfFtAJa1Ha1bL6L4GIAb7ruU9Xp vEiTNXKi7c6KFTO1GyD86ZAfrl6g9y5ezo8+nxiKK1DHBmZa5zMJKQMfxMZfQrHD StRqV7zOSxAs0/wNqwu8JyPlx1WZ8l88XYwp9lcGSpGbuvooKB+0XWR2S7aDAYAG gXsUPZWZ6aqezkiI/pJ8q6dgxjdkbqivimYTHmARLkR0npDQ3fk/0+XGN/09xLYU 5LeIicTzEdFjGYpmIMsw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xj72901ky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 17 Apr 2024 04:28:07 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43H4S78f030454 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 17 Apr 2024 04:28:07 GMT Received: from hu-adisi-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 16 Apr 2024 21:28:05 -0700 From: Aditya Kumar Singh To: CC: Sriram R , Aditya Kumar Singh Subject: [PATCH v2 05/22] hostapd: MLO: handle auth/assoc on link address Date: Wed, 17 Apr 2024 09:57:44 +0530 Message-ID: <20240417042744.2004649-1-quic_adisi@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240328181652.2956122-6-quic_adisi@quicinc.com> References: <20240328181652.2956122-6-quic_adisi@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: eDpRooXY0R5WgVwkZokp76IwxRuuvxQD X-Proofpoint-GUID: eDpRooXY0R5WgVwkZokp76IwxRuuvxQD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-17_03,2024-04-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 impostorscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404170028 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240416_212809_397463_89FAD3F9 X-CRM114-Status: GOOD ( 18.62 ) X-Spam-Score: -0.2 (/) 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: Sriram R Currently in function mlme_event_mgmt_tx_status(), link_id will be only filled if the frame was the last transmitted on the whole drv (driver) level. With co-hosted MLDs, there could be cases where mu [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO 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_EF Message has a valid DKIM or DK signature from envelope-from 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 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: Sriram R Currently in function mlme_event_mgmt_tx_status(), link_id will be only filled if the frame was the last transmitted on the whole drv (driver) level. With co-hosted MLDs, there could be cases where multiple packets are sent out by various interfaces (BSS) under the same drv. Now while handling the Tx status, only one interface will get the proper link_id. Rest all will get -1, and event will be routed to first BSS always. If the packet was not sent from first BSS then this leads to possibility of packet getting dropped. Hence in order to make the underlying link identification easier, modify authentication and association frames to be always sent with link address as A1 and A3 for ease of Tx status handling. Signed-off-by: Sriram R Signed-off-by: Aditya Kumar Singh --- v2: Rephrased commit message a bit to describe why changes is required --- src/ap/ieee802_11.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 85a39d5ffb0e..b045dc6f7cb0 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -416,14 +416,7 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta, struct wpabuf *ml_resp = NULL; #ifdef CONFIG_IEEE80211BE - /* - * Once a non-AP MLD is added to the driver, the addressing should use - * the MLD MAC address. Thus, use the MLD address instead of translating - * the addresses. - */ if (ap_sta_is_mld(hapd, sta)) { - sa = hapd->mld->mld_addr; - ml_resp = hostapd_ml_auth_resp(hapd); if (!ml_resp) return -1; @@ -444,7 +437,7 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta, WLAN_FC_STYPE_AUTH); os_memcpy(reply->da, dst, ETH_ALEN); os_memcpy(reply->sa, sa, ETH_ALEN); - os_memcpy(reply->bssid, bssid, ETH_ALEN); + os_memcpy(reply->bssid, sa, ETH_ALEN); reply->u.auth.auth_alg = host_to_le16(auth_alg); reply->u.auth.auth_transaction = host_to_le16(auth_transaction); @@ -3265,14 +3258,9 @@ static void handle_auth(struct hostapd_data *hapd, bssid = mgmt->bssid; #ifdef CONFIG_IEEE80211BE - /* - * Once a non-AP MLD is added to the driver, the addressing should use - * the MLD MAC address. It is the responsibility of the driver to - * handle the translations. - */ if (ap_sta_is_mld(hapd, sta)) { dst = sta->addr; - bssid = hapd->mld->mld_addr; + bssid = hapd->own_addr; } #endif /* CONFIG_IEEE80211BE */ @@ -4823,15 +4811,6 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta, (reassoc ? WLAN_FC_STYPE_REASSOC_RESP : WLAN_FC_STYPE_ASSOC_RESP)); -#ifdef CONFIG_IEEE80211BE - /* - * Once a non-AP MLD is added to the driver, the addressing should use - * MLD MAC address. - */ - if (ap_sta_is_mld(hapd, sta) && allow_mld_addr_trans) - sa = hapd->mld->mld_addr; -#endif /* CONFIG_IEEE80211BE */ - os_memcpy(reply->da, addr, ETH_ALEN); os_memcpy(reply->sa, sa, ETH_ALEN); os_memcpy(reply->bssid, sa, ETH_ALEN);