From patchwork Mon Apr 8 13:06:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920840 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=VeCjVgCT; 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=OAp5c9eT; 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 4VCqD45LBTz1yY8 for ; Mon, 8 Apr 2024 23:08:52 +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=iNqoroufMRtk4APvZqS3SP3dFO5rzhmYzsCIiDfHjzI=; b=VeCjVgCTBYy0oW t3O5REKzCCOkcnJfEQFuWG2snuW/UoWOAlXYdfw7Us2aVCEcJjAlgN20uu3iaM7oVbGR7KQaldRJq dlAj5+8527pHyftz4sZvm/tx/jfOQLpWaHlvupoaIQKa5jRI8zXWnxtjgd1TEqyLYuD7s3HmzKQu4 vDw73QDvGIOQRJhdkngAsrrIkxN4ztGBbaXF4VJD7Jc2bWyOgBl0yFD0E+1wFmcMjjowRnMrU6bcZ w9ol/kpWT0GPKobDG47Wo1ZhHK1WnjWXiaCSRTlIxgBepPRkvIHvVDxI85tlToqsB+VjQopvuKTKI 3Gpqt9GKj1Tj1G8UYZEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojh-0000000FdwJ-0Gtc; Mon, 08 Apr 2024 13:08:33 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojZ-0000000Fdti-2pPY for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581705; x=1744117705; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BLXl/o04Jv4WN6pp+IkFBVyyUDJlHSC3r0OQGnsRVJY=; b=OAp5c9eTw4qohgPnjyPpKNr5JWJ7ALFqSmu4VpUZ8KJB+AE2afMtBXxa 0BH8C5aGiB21emrL+RaU8Up9Ig+Od212GRDvEDa8mplw1jbmHKcy+fqRK CoIXcnVw5XM5Ill+V396g8tUdoh7+sHH+3egcVBYHNAFmBnBAgyOGh4jq gTQYzFznIEIq+iE1/kPUIVdPJD++FDLHg97hwJjfFNn5/BhBhbFPNh7Bp e3Rft76XAbqhzdqcrSGeibof4XcD4+wUfKz75BtntpbTKNWPFSm6EYG3x S4rC8be0rHxTPk8F8LMViEKQrMteSyDUQitnOvKyQqKYyJq5kJKR6gtcF Q==; X-CSE-ConnectionGUID: tcNajoIOTKaak1X/ZGS3+Q== X-CSE-MsgGUID: HwWw25/ES9+kcxVvv5tuVw== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688889" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688889" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:25 -0700 X-CSE-ConnectionGUID: 4Dr1hJ+5Rr+TBYZ3fQarhw== X-CSE-MsgGUID: BAeIcfEjSnqHljozbG+hxw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868804" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:25 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 5/7] SME: MLD: Use AP MLD address with deauthenticate Date: Mon, 8 Apr 2024 16:06:59 +0300 Message-ID: <20240408130701.531194-5-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240408_060826_074176_420EDA10 X-CRM114-Status: GOOD ( 10.21 ) X-Spam-Score: -2.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 authentication is an MLD authentication need to use the AP MLD address when requesting the driver to deauthenticate. In addition, in case of failure handling an authentication frame from the AP MLD, clear the MLD state only after the deauthentication is done. Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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.5 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 authentication is an MLD authentication need to use the AP MLD address when requesting the driver to deauthenticate. In addition, in case of failure handling an authentication frame from the AP MLD, clear the MLD state only after the deauthentication is done. Signed-off-by: Ilan Peer --- wpa_supplicant/sme.c | 5 +++-- wpa_supplicant/wpa_supplicant.c | 13 ++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 775fe9ea03..5766cdbf4e 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -508,8 +508,6 @@ static int wpas_sme_ml_auth(struct wpa_supplicant *wpa_s, return 0; out: - wpa_printf(MSG_DEBUG, "MLD: Authentication - clearing MLD state"); - wpas_reset_mlo_info(wpa_s); return -1; } @@ -2158,6 +2156,9 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data) wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL); wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING); + wpa_printf(MSG_DEBUG, + "MLD: Authentication - clearing MLD state"); + wpas_reset_mlo_info(wpa_s); return; } diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index ab71e2f273..54501b7636 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -4588,9 +4588,16 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s, reason_code, reason2str(reason_code), wpa_supplicant_state_txt(wpa_s->wpa_state)); - if (!is_zero_ether_addr(wpa_s->pending_bssid) && - (wpa_s->wpa_state == WPA_AUTHENTICATING || - wpa_s->wpa_state == WPA_ASSOCIATING)) + wpa_dbg(wpa_s, MSG_DEBUG, + "deauthenticate: valid_links=0x%x, ap_mld_addr=" MACSTR, + wpa_s->valid_links, MAC2STR(wpa_s->ap_mld_addr)); + + if (wpa_s->valid_links && + !is_zero_ether_addr(wpa_s->ap_mld_addr)) + addr = wpa_s->ap_mld_addr; + else if (!is_zero_ether_addr(wpa_s->pending_bssid) && + (wpa_s->wpa_state == WPA_AUTHENTICATING || + wpa_s->wpa_state == WPA_ASSOCIATING)) addr = wpa_s->pending_bssid; else if (!is_zero_ether_addr(wpa_s->bssid)) addr = wpa_s->bssid;