Message ID | 20230522193412.658666-33-andrei.otcheretianski@intel.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=<UNKNOWN>) 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=ABNQUo7o; 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=QZAALV8b; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QQ8jM3pXGz20f8 for <incoming@patchwork.ozlabs.org>; Tue, 23 May 2023 06:50:30 +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=YPGfRcHTpZgbbys1GhCqHs2dEyM5o4VrlsCaRdBwOls=; b=ABNQUo7oTjUH+E lbcCv6T028t4u2s/GLSOXGaad2cStrHj2DTx6eS46mnSC/D8LGoDwkebYON31Fv3w3jkndYMSD99Y 3pjArGXt777vqH4ZAqtpho+wEl5NZ3qDo513JwmnyN0U7JiLxwl8CbAxeLr+TwnpawT9wQyQ0xq9+ rTwxsRJ3snweMUT5Q0G7/JtMLbq+fY9sLWMAZ8J2yF1ra42ZkQErrvV9oQHKTtnB3gxDfxDF0gpMW A+jriX5+dr1wR4qoRi72a2VZouRMp+xIIN2HmqhzYJBNR+B0ygqb9ix4HUmO7B4kuBu/LdxKZPe3K U0uR2fa33RVpG/chfdEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1CTY-007y5R-0y; Mon, 22 May 2023 20:49:52 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1BJX-007i7A-0t for hostap@lists.infradead.org; Mon, 22 May 2023 19:35:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684784127; x=1716320127; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Zfe6ge/lX7W8b4bdghf8utjRlgtUGxLnk/vPVSkA9eM=; b=QZAALV8bgGGzH5h85LURkc3/4blJ7g/ze0XLhI5agoSqeEtW8/75+KHO 8bUTy83ajpxDGs7YDWfqOcSf2I9Q3jfDu0XR70YpwWnQ46ZoEOxIg10HR H0TmadrRIDdqltYwc+6fyLL1R7Na/nlhcmisIm89mkGu5+Esrpz1jMpd6 fovVJpjlLuXsQpMU1yrnX2esf75WflsGuKtIpurwC30A/WQry68durZnR jlFyulAmzjjgfHNiSY44zxrfP8kkVM5mL4h29X2kWOVJBOlemNOpoajvo QEqsBgFQpsfHal5iH2M8GAHrKd/WoUzAZQl/vZ3VhiHlqNXuZxlCE+LsA w==; X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="351869312" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="351869312" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 12:35:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="827809393" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="827809393" Received: from ghorst-mobl3.ger.corp.intel.com (HELO aotchere-desk.intel.com) ([10.254.149.56]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 12:35:24 -0700 From: Andrei Otcheretianski <andrei.otcheretianski@intel.com> To: hostap@lists.infradead.org Cc: Ilan Peer <ilan.peer@intel.com>, Andrei Otcheretianski <andrei.otcheretianski@intel.com> Subject: [PATCH v2 32/44] WPA_AUTH: MLO: Add MAC KDE to 1st message in 4-way handshake Date: Mon, 22 May 2023 22:34:00 +0300 Message-Id: <20230522193412.658666-33-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230522193412.658666-1-andrei.otcheretianski@intel.com> References: <20230522193412.658666-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-20230522_123527_371289_6AB84D9C X-CRM114-Status: GOOD ( 11.70 ) X-Spam-Score: -2.7 (--) 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 <ilan.peer@intel.com> Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> --- src/ap/wpa_auth.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertion [...] Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.120 listed in list.dnswl.org] 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: <hostap.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>, <mailto:hostap-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/hostap/> List-Post: <mailto:hostap@lists.infradead.org> List-Help: <mailto:hostap-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>, <mailto:hostap-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Hostap" <hostap-bounces@lists.infradead.org> Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Add basic MLO support for AP
|
expand
|
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index f661585611..a5ec013b02 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -2291,8 +2291,9 @@ SM_STATE(WPA_PTK, INITPSK) SM_STATE(WPA_PTK, PTKSTART) { - u8 buf[2 + RSN_SELECTOR_LEN + PMKID_LEN], *pmkid = NULL; - size_t pmkid_len = 0; + u8 buf[2 * (2 + RSN_SELECTOR_LEN) + PMKID_LEN + ETH_ALEN]; + u8 *pmkid = NULL; + size_t kde_len = 0; u16 key_info; SM_ENTRY_MA(WPA_PTK, PTKSTART, wpa_ptk); @@ -2330,7 +2331,7 @@ SM_STATE(WPA_PTK, PTKSTART) wpa_key_mgmt_sae(sm->wpa_key_mgmt)) && sm->wpa_key_mgmt != WPA_KEY_MGMT_OSEN) { pmkid = buf; - pmkid_len = 2 + RSN_SELECTOR_LEN + PMKID_LEN; + kde_len = 2 + RSN_SELECTOR_LEN + PMKID_LEN; pmkid[0] = WLAN_EID_VENDOR_SPECIFIC; pmkid[1] = RSN_SELECTOR_LEN + PMKID_LEN; RSN_SELECTOR_PUT(&pmkid[2], RSN_KEY_DATA_PMKID); @@ -2398,12 +2399,27 @@ SM_STATE(WPA_PTK, PTKSTART) } } if (!pmkid) - pmkid_len = 0; + kde_len = 0; + +#ifdef CONFIG_IEEE80211BE + if (sm->mld_assoc_link_id >= 0) { + wpa_printf(MSG_DEBUG, + "RSN: MLD: Adding MAC Address KDE: kde_len=%zu", + kde_len); + + wpa_add_kde(buf + kde_len, RSN_KEY_DATA_MAC_ADDR, + sm->own_mld_addr, ETH_ALEN, NULL, 0); + + kde_len += 2 + RSN_SELECTOR_LEN + ETH_ALEN; + } +#endif /* CONFIG_IEEE80211BE */ + key_info = WPA_KEY_INFO_ACK | WPA_KEY_INFO_KEY_TYPE; if (sm->pairwise_set && sm->wpa != WPA_VERSION_WPA) key_info |= WPA_KEY_INFO_SECURE; + wpa_send_eapol(sm->wpa_auth, sm, key_info, NULL, - sm->ANonce, pmkid, pmkid_len, 0, 0); + sm->ANonce, buf, kde_len, 0, 0); }