{"id":2226428,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2226428/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/patch/20260422122424.43776-85-andrei.otcheretianski@intel.com/","project":{"id":22,"url":"http://patchwork.ozlabs.org/api/1.2/projects/22/?format=json","name":"HostAP Development","link_name":"hostap","list_id":"hostap.lists.infradead.org","list_email":"hostap@lists.infradead.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260422122424.43776-85-andrei.otcheretianski@intel.com>","list_archive_url":null,"date":"2026-04-22T12:24:15","name":"[84/92] NAN: Add key_mgmt and verify flag to NAN-PAIRING-REQUEST notification","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"722882a9f050013ab9671d2e23673d0dd75dfb80","submitter":{"id":62065,"url":"http://patchwork.ozlabs.org/api/1.2/people/62065/?format=json","name":"Andrei Otcheretianski","email":"andrei.otcheretianski@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/hostap/patch/20260422122424.43776-85-andrei.otcheretianski@intel.com/mbox/","series":[{"id":501001,"url":"http://patchwork.ozlabs.org/api/1.2/series/501001/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/list/?series=501001","date":"2026-04-22T12:23:05","name":"Add NAN PASN pairing support","version":1,"mbox":"http://patchwork.ozlabs.org/series/501001/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2226428/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2226428/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <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;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=wrZ9wm4g;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=desiato.20200630 header.b=W4g+NVlr;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=JwV43CfP;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0z9h4Wssz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 22:31:36 +1000 (AEST)","from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFWjR-0000000AAzF-1wYa;\n\tWed, 22 Apr 2026 12:31:05 +0000","from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFWfv-0000000A64Y-2f5b\n\tfor hostap@bombadil.infradead.org;\n\tWed, 22 Apr 2026 12:27:27 +0000","from mgamail.intel.com ([192.198.163.17])\n\tby desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFWfq-0000000BKYa-1vVt\n\tfor hostap@lists.infradead.org;\n\tWed, 22 Apr 2026 12:27:26 +0000","from orviesa010.jf.intel.com ([10.64.159.150])\n  by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Apr 2026 05:26:51 -0700","from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com)\n ([10.167.28.6])\n  by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Apr 2026 05:26:50 -0700"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=HzqelFRwSilaDcQvaJfvu2jjJIW7FyRazbinDid6Kkw=; b=wrZ9wm4g5/0CoO\n\t6hTjdADfLV8MvHASBS3SsIpwX+mxee82sWmQrvD154QRLmPyZSGoHyX+REvkqlRvAqE6mtx04FNs5\n\tIlXlUi2aq89PPYUgKFRVKKoxbYQJK5mHv0TXJ6EGSdMKe/27lAopjWVdnJBmVc/2GpKdCkrw4926a\n\tcKeXLkH+4RY0u9bilKpkmk9RPlLMnc+S2wnyMYSUzMAYXWDKCFekUAT62CH+nb+UWPjmWVgzxCrjs\n\t4d/KUpdJzJHJ8hEJOpR062biFy+l0vACt5XsdTeJXX9CM2zxLbkXliymr09/zFD/6TSzs+F8hqDZZ\n\tUtvSlUXVhL7bqNYIUoCQ==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version\n\t:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:\n\tContent-Type:Content-ID:Content-Description;\n\tbh=xQrHNjJx99nrsvgd7rYWz51YWV8wnm7ngFcz2V7Rzj0=; b=W4g+NVlr6vlmWJU3wJhS1wtmpp\n\tEp11NIRJx8FMfc6odOZPAhDHfnHjk3wOA+AaAk1y+CB5GQdnF9hNTp/SAKaE82VOAgAe9LhbpV0+o\n\t+qafKoZfNp3iIAnbKHdF656MG3UL9eas+h1KyDflnQrs3NoXN6oeSN7TAJ05Gnu8JANuF1I47NV4E\n\tyWTc9QkDywqkDxb3DfECdeeE0eBZzom1KGTF0/Wv2DNgfZmIImK7uI1cECC3hzkSi94rylHKp5Rh3\n\tyJ9HxxqrR8Q4w2ALfslkfCQmG4SrRAAGv1GCMo0ghsrEnOZOrJAvu4KzIpMdRs3Lxvj1oJWz9hbN1\n\tUA7GCsMQ==;","v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1776860842; x=1808396842;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=5IA5lJDFk0sJ+xcQvS8xvSiVQf1yZA8L5Tf/YFKk5qI=;\n  b=JwV43CfPZC2oPcWewIkrzq8b2/RYT0AiCUuK58YCa7UcRo5005lOP0ci\n   AuYsT6/KoB6rjpsDSEVyG7Goz8D64WYlTfUnVn6axmrc++/rnCV2SP8Ld\n   e0orncw9v8p2TKcFqEPYNuJJbQNq23/W/WqUiEsP0V9fy2UgdxhVpT8YU\n   Ujxrw/Zu9WJFAhLKrSY9ZKiEnrJHhLEmFIYAqQw5TkdA8EQPIIKX4oXJu\n   2kKeBEl9cSwx1fhdddM01CPmiLSTDxnaNZ28UkWU7MJBNVrnnOD3xupAz\n   XzxnDavg9FPTbJjMYY8LvoT7IPEhSMYQNN2HnvfVU5BfEzPpEy+fxtcMj\n   g==;"],"X-CSE-ConnectionGUID":["33ajCnIhQ3iAsL8ZhK3WiQ==","FpZxtRdzRHSyAPXplLShfg=="],"X-CSE-MsgGUID":["G3avw2H9S7aXWFa3kCUrwA==","2SNocfx4QCuqtnHcvoPMzA=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11764\"; a=\"77687603\"","E=Sophos;i=\"6.23,192,1770624000\";\n   d=\"scan'208\";a=\"77687603\"","E=Sophos;i=\"6.23,192,1770624000\";\n   d=\"scan'208\";a=\"231445321\""],"X-ExtLoop1":"1","From":"Andrei Otcheretianski <andrei.otcheretianski@intel.com>","To":"hostap@lists.infradead.org","Cc":"vamsin@qti.qualcomm.com,\n\tmaheshkkv@google.com,\n\tAndrei Otcheretianski <andrei.otcheretianski@intel.com>","Subject":"[PATCH 84/92] NAN: Add key_mgmt and verify flag to\n NAN-PAIRING-REQUEST notification","Date":"Wed, 22 Apr 2026 15:24:15 +0300","Message-ID":"<20260422122424.43776-85-andrei.otcheretianski@intel.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260422122424.43776-1-andrei.otcheretianski@intel.com>","References":"<20260422122424.43776-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-20260422_132722_944263_C27CDBBD ","X-CRM114-Status":"GOOD (  15.41  )","X-Spam-Score":"-2.5 (--)","X-Spam-Report":"Spam detection software,\n running on the system \"desiato.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  Change pairing_request callback to accept the parsed RSN IE\n    data from the peer's PASN Auth1 frame. Print key_mgmt and indicate whether\n    it is a verification request. - key_mgmt: displayed in human-read [...]\n Content analysis details:   (-2.5 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,\n                             medium trust\n                             [192.198.163.17 listed in list.dnswl.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.0 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>,\n <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>,\n <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"},"content":"Change pairing_request callback to accept the parsed RSN IE data\nfrom the peer's PASN Auth1 frame.\nPrint key_mgmt and indicate whether it is a verification request.\n- key_mgmt: displayed in human-readable format\n- verify: is a boolean value, indicating whether PMKID was provided in\n  auth1 frame.\n\nSigned-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>\n---\n src/nan/nan.h                   |  5 ++++-\n src/nan/nan_pairing.c           | 22 +++++++++++++++++++++-\n wpa_supplicant/nan_supplicant.c |  8 ++++++--\n wpa_supplicant/notify.c         |  9 ++++++---\n wpa_supplicant/notify.h         |  3 ++-\n 5 files changed, 39 insertions(+), 8 deletions(-)","diff":"diff --git a/src/nan/nan.h b/src/nan/nan.h\nindex c66b6a3b5a..2beb0dbc2c 100644\n--- a/src/nan/nan.h\n+++ b/src/nan/nan.h\n@@ -672,8 +672,11 @@ struct nan_config {\n \t * @peer_nmi: Peer NMI address\n \t * @csid: Cipher suite ID requested by the peer\n \t * @instance_id: Service instance ID for which the pairing is requested\n+\t * @rsn_data: Parsed RSN IE data from peer's Auth frame\n \t */\n-\tvoid (*pairing_request)(void *ctx, const u8 *peer_nmi, u8 csid, u8 instance_id);\n+\tvoid (*pairing_request)(void *ctx, const u8 *peer_nmi, u8 csid,\n+\t\t\t\tu8 instance_id,\n+\t\t\t\tconst struct wpa_ie_data *rsn_data);\n };\n \n struct nan_data * nan_init(const struct nan_config *cfg);\ndiff --git a/src/nan/nan_pairing.c b/src/nan/nan_pairing.c\nindex 43b59e154f..029486a385 100644\n--- a/src/nan/nan_pairing.c\n+++ b/src/nan/nan_pairing.c\n@@ -1228,6 +1228,8 @@ int nan_pairing_auth_rx(struct nan_data *nan_data,\n \t\tif (status_code == WLAN_STATUS_SUCCESS &&\n \t\t    auth_transaction == 1) {\n \t\t\tstruct nan_cipher_suite cs;\n+\t\t\tconst u8 *rsn_ie;\n+\t\t\tstruct wpa_ie_data rsn_data;\n \n \t\t\tif (nan_pairing_process_elems(nan_data, peer, mgmt, len, &cs)) {\n \t\t\t\twpa_printf(MSG_DEBUG,\n@@ -1235,6 +1237,23 @@ int nan_pairing_auth_rx(struct nan_data *nan_data,\n \t\t\t\treturn -1;\n \t\t\t}\n \n+\t\t\trsn_ie = get_ie(mgmt->u.auth.variable,\n+\t\t\t\t\tlen - offsetof(struct ieee80211_mgmt,\n+\t\t\t\t\tu.auth.variable),\n+\t\t\t\t\tWLAN_EID_RSN);\n+\t\t\tif (!rsn_ie) {\n+\t\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t\t   \"NAN: Pairing: RSN IE missing in Auth1\");\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\n+\t\t\tif (wpa_parse_wpa_ie_rsn(rsn_ie, rsn_ie[1] + 2,\n+\t\t\t\t\t\t &rsn_data)) {\n+\t\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t\t   \"NAN: Pairing: Failed to parse RSN IE in Auth1\");\n+\t\t\t\treturn -1;\n+\t\t\t}\n+\n \t\t\twpabuf_free(peer->pairing.pending_auth1);\n \t\t\tpeer->pairing.pending_auth1 =\n \t\t\t\twpabuf_alloc_copy((const u8 *)mgmt, len);\n@@ -1243,7 +1262,8 @@ int nan_pairing_auth_rx(struct nan_data *nan_data,\n \n \t\t\tnan_data->cfg->pairing_request(nan_data->cfg->cb_ctx,\n \t\t\t\t\t\t       peer->nmi_addr, cs.csid,\n-\t\t\t\t\t\t       cs.instance_id);\n+\t\t\t\t\t\t       cs.instance_id,\n+\t\t\t\t\t\t       &rsn_data);\n \t\t\treturn 0;\n \t\t}\n \ndiff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c\nindex 8a24937137..c083c4ade8 100644\n--- a/wpa_supplicant/nan_supplicant.c\n+++ b/wpa_supplicant/nan_supplicant.c\n@@ -1028,10 +1028,14 @@ static const struct wpabuf *wpas_nan_get_npk_akmp_cb(void *ctx,\n \n static void\n wpas_nan_pasn_pairing_request_cb(void *ctx, const u8 *peer_nmi, u8 csid,\n-\t\t\t\t u8 instance_id)\n+\t\t\t\t u8 instance_id,\n+\t\t\t\t const struct wpa_ie_data *rsn_data)\n {\n \tstruct wpa_supplicant *wpa_s = ctx;\n-\twpas_notify_nan_pairing_request(wpa_s, peer_nmi, csid, instance_id);\n+\n+\twpas_notify_nan_pairing_request(wpa_s, peer_nmi, csid, instance_id,\n+\t\t\t\t\trsn_data->key_mgmt,\n+\t\t\t\t\t!!rsn_data->num_pmkid);\n }\n #endif /* CONFIG_PASN */\n \ndiff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c\nindex 80545c456d..8a0cabc052 100644\n--- a/wpa_supplicant/notify.c\n+++ b/wpa_supplicant/notify.c\n@@ -1333,11 +1333,14 @@ out:\n \n void wpas_notify_nan_pairing_request(struct wpa_supplicant *wpa_s,\n \t\t\t\t     const u8 *peer_nmi, u8 csid,\n-\t\t\t\t     u8 instance_id)\n+\t\t\t\t     u8 instance_id, int key_mgmt,\n+\t\t\t\t     bool verify)\n {\n \twpa_msg_global(wpa_s, MSG_INFO, NAN_PAIRING_REQUEST\n-\t\t       \"peer_nmi=\" MACSTR \" csid=%u instance_id=%u\",\n-\t\t       MAC2STR(peer_nmi), csid, instance_id);\n+\t\t       \"peer_nmi=\" MACSTR \" csid=%u instance_id=%u key_mgmt=%s verify=%d\",\n+\t\t       MAC2STR(peer_nmi), csid, instance_id,\n+\t\t       wpa_key_mgmt_txt(key_mgmt, WPA_PROTO_RSN),\n+\t\t       verify);\n }\n \n \ndiff --git a/wpa_supplicant/notify.h b/wpa_supplicant/notify.h\nindex 2ef2b59d32..3d683c4219 100644\n--- a/wpa_supplicant/notify.h\n+++ b/wpa_supplicant/notify.h\n@@ -232,7 +232,8 @@ void wpas_notify_nan_bootstrap_failure(struct wpa_supplicant *wpa_s,\n \t\t\t\t       u8 requestor_instance_id);\n void wpas_notify_nan_pairing_request(struct wpa_supplicant *wpa_s,\n \t\t\t\t     const u8 *peer_nmi, u8 csid,\n-\t\t\t\t     u8 instance_id);\n+\t\t\t\t     u8 instance_id, int key_mgmt,\n+\t\t\t\t     bool verify);\n void wpas_notify_nan_ndp_request(struct wpa_supplicant *wpa_s,\n \t\t\t\t const u8 *peer_nmi, const u8 *init_ndi,\n \t\t\t\t u32 ndp_id, u8 publish_inst_id,\n","prefixes":["84/92"]}