Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2226400/?format=api
{ "id": 2226400, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226400/?format=api", "web_url": "http://patchwork.ozlabs.org/project/hostap/patch/20260422122424.43776-54-andrei.otcheretianski@intel.com/", "project": { "id": 22, "url": "http://patchwork.ozlabs.org/api/1.2/projects/22/?format=api", "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-54-andrei.otcheretianski@intel.com>", "list_archive_url": null, "date": "2026-04-22T12:23:44", "name": "[53/92] NAN: Parse PMKIDs from the SCIA in publish messages", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a232f0e4240efc469b540452d124ba93af782b8f", "submitter": { "id": 62065, "url": "http://patchwork.ozlabs.org/api/1.2/people/62065/?format=api", "name": "Andrei Otcheretianski", "email": "andrei.otcheretianski@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/hostap/patch/20260422122424.43776-54-andrei.otcheretianski@intel.com/mbox/", "series": [ { "id": 501001, "url": "http://patchwork.ozlabs.org/api/1.2/series/501001/?format=api", "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/2226400/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226400/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=IH0YqhPC;\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=ilNnxjiN;\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 4g0z6s3PFSz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 22:29:09 +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 1wFWh2-0000000A7ca-0hgN;\n\tWed, 22 Apr 2026 12:28:36 +0000", "from mgamail.intel.com ([192.198.163.17])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wFWfD-0000000A34B-24JN\n\tfor hostap@lists.infradead.org;\n\tWed, 22 Apr 2026 12:26:50 +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:01 -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:00 -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=WJ1CqvKWswSpDMJhCLC3oo9/lbDhHxMKXWPSKrfurBg=; b=IH0YqhPCoXNb0F\n\t4741u53oZ+JI0CHF2BTDbT9X0Jk7Hhp2jFMbusjMkC/kGmsrh7uXOqpD0Q9nr3z6diVk+L29nGK2L\n\teUJotvE/jRpeQuF24q23qqsaLjwh05Gad/wUVnrSIO6/wdeqRvYMOyengWOFKCTIY8Mkv9hpUTlaR\n\tMI2Z6l80Q19d6QvbQTc3JROlsIGwxhx5F8leeodooQjWlsqBUpvNsXAoRns+DS+yh9oz79C/b/eOL\n\tNxzoe5KOoHMTrw2v63qkBe2QzQ6w7OlsXXgzn+1KTkQ+zvujlQR+/JDgn1Cv8e0e1AfP+xGRYQSIy\n\tisdRFOetP6vjRY1Y9Dmg==;", "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1776860803; x=1808396803;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=EfvDINaZwJmumWj+alOTbVstTZF966TsCn+YcH2Z2BE=;\n b=ilNnxjiNX3XppVh+soY49z7T6d92HF2nSNDw7g6b67tg9SfdRf3rGgSo\n tAdH4tGq43lL9fAeOs2fB6q+Xll4Bqx9G5xwRr4mD1LAq7Y2gS1r5JMxY\n jO6osdQ8/AAaolJFXTPqvpedQnzPS+XcKw4X3MscVRMSPCSjymC+XGfc7\n Y3G1N8w9sLsrSQPf1V8uO2sWocWIFeZZy+deoN1Ex6ULualRhZtcuXrR7\n BMBaZr8/5mavVlWQQ6FK+ZGOZO2OZQp+B5DXYd2xaX+rJu/c8bKcl8xZL\n SiBCfpEKp04XWKP/Do+EZZN4dolIobZXrVmBNutdZd1DkToTJpO7veams\n A==;" ], "X-CSE-ConnectionGUID": [ "Mn6ErMpKSZeepAzXjKJhwQ==", "atG9xjfRQ/qkSVMn8SDKbw==" ], "X-CSE-MsgGUID": [ "F8sUyCaOQgKwgeGEqeSuwQ==", "f6kCsTygSOqgdIlSdd5Rmw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11764\"; a=\"77687411\"", "E=Sophos;i=\"6.23,192,1770624000\";\n d=\"scan'208\";a=\"77687411\"", "E=Sophos;i=\"6.23,192,1770624000\";\n d=\"scan'208\";a=\"231445110\"" ], "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\tAvraham Stern <avraham.stern@intel.com>", "Subject": "[PATCH 53/92] NAN: Parse PMKIDs from the SCIA in publish messages", "Date": "Wed, 22 Apr 2026 15:23:44 +0300", "Message-ID": "<20260422122424.43776-54-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_052643_677499_C696962B ", "X-CRM114-Status": "GOOD ( 16.41 )", "X-Spam-Score": "-4.4 (----)", "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.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: From: Avraham Stern <avraham.stern@intel.com> If the\n publish\n message includes a Security Context Information attribute with a list of\n PMKIDs,\n parse the PMKIDs associated with the service and add them to the discovery\n result notification.\n Content analysis details: (-4.4 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_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS SPF: sender matches SPF record\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\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_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n [score: 0.0000]\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": "From: Avraham Stern <avraham.stern@intel.com>\n\nIf the publish message includes a Security Context Information\nattribute with a list of PMKIDs, parse the PMKIDs associated with\nthe service and add them to the discovery result notification.\n\nSigned-off-by: Avraham Stern <avraham.stern@intel.com>\n---\n src/ap/nan_usd_ap.c | 3 +-\n src/common/nan_de.c | 80 +++++++++++++++++++++++++++++++--\n src/common/nan_de.h | 3 +-\n wpa_supplicant/nan_supplicant.c | 3 +-\n 4 files changed, 83 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/ap/nan_usd_ap.c b/src/ap/nan_usd_ap.c\nindex 34f268d880..d7719e89cb 100644\n--- a/src/ap/nan_usd_ap.c\n+++ b/src/ap/nan_usd_ap.c\n@@ -48,7 +48,8 @@ hostapd_nan_de_discovery_result(void *ctx, int subscribe_id,\n \t\t\t\tenum nan_service_protocol_type srv_proto_type,\n \t\t\t\tconst u8 *ssi, size_t ssi_len,\n \t\t\t\tint peer_publish_id, const u8 *peer_addr,\n-\t\t\t\tbool fsd, bool fsd_gas)\n+\t\t\t\tbool fsd, bool fsd_gas,\n+\t\t\t\tconst u8 *pmkid_list, size_t pmkid_count)\n {\n \tstruct hostapd_data *hapd = ctx;\n \tchar *ssi_hex;\ndiff --git a/src/common/nan_de.c b/src/common/nan_de.c\nindex 779e3f11aa..7a728c45b5 100644\n--- a/src/common/nan_de.c\n+++ b/src/common/nan_de.c\n@@ -1132,6 +1132,66 @@ static void nan_de_get_sdea(const u8 *buf, size_t len, u8 instance_id,\n }\n \n \n+static size_t nan_de_parse_scia(const u8 *buf, size_t len, u8 instance_id,\n+\t\t\t\tu8 *pmkid_list, size_t max_pmkids)\n+{\n+\tconst u8 *scia, *end;\n+\tu16 scia_len;\n+\tsize_t pmkid_count = 0;\n+\n+\tscia = nan_de_get_attr(buf, len, NAN_ATTR_SCIA, 0);\n+\tif (!scia)\n+\t\treturn 0;\n+\n+\tscia++;\n+\tscia_len = WPA_GET_LE16(scia);\n+\tscia += 2;\n+\n+\tend = scia + scia_len;\n+\n+\twpa_printf(MSG_DEBUG,\n+\t\t \"NAN: Parsing Security Context Information attribute (len=%u)\",\n+\t\t scia_len);\n+\n+\t/* Parse list of Security Context Identifiers */\n+\twhile (end - scia >= (unsigned int)sizeof(struct nan_sec_ctxt)) {\n+\t\tstruct nan_sec_ctxt *sec_ctx = (void *)scia;\n+\t\tu16 scid_len = le_to_host16(sec_ctx->len);\n+\n+\t\tif (scid_len + (unsigned int)sizeof(*sec_ctx) > end - scia) {\n+\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t \"NAN: Invalid SCID length %u (remaining %zu)\",\n+\t\t\t\t scid_len, end - scia);\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\t/* Check if this is for our instance_id and is a PMKID type */\n+\t\tif (sec_ctx->scid == NAN_SEC_CTX_TYPE_ND_PMKID &&\n+\t\t sec_ctx->instance_id == instance_id) {\n+\t\t\tif (scid_len == PMKID_LEN &&\n+\t\t\t pmkid_count < max_pmkids) {\n+\t\t\t\tos_memcpy(&pmkid_list[pmkid_count * PMKID_LEN],\n+\t\t\t\t\t sec_ctx->ctxt, PMKID_LEN);\n+\t\t\t\tpmkid_count++;\n+\t\t\t\twpa_hexdump(MSG_DEBUG, \"NAN: Parsed PMKID\",\n+\t\t\t\t\t sec_ctx->ctxt, PMKID_LEN);\n+\t\t\t} else {\n+\t\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t\t \"NAN: Unexpected SCID length %u or max PMKIDs reached\",\n+\t\t\t\t\t scid_len);\n+\t\t\t}\n+\t\t}\n+\n+\t\tscia += scid_len + sizeof(*sec_ctx);\n+\t}\n+\n+\twpa_printf(MSG_DEBUG, \"NAN: Parsed %zu PMKIDs from SCIA\",\n+\t\t pmkid_count);\n+\n+\treturn pmkid_count;\n+}\n+\n+\n static void nan_de_process_elem_container(struct nan_de *de, const u8 *buf,\n \t\t\t\t\t size_t len, const u8 *peer_addr,\n \t\t\t\t\t unsigned int freq, bool p2p, bool pr)\n@@ -1270,8 +1330,13 @@ static bool nan_de_rx_publish(struct nan_de *de, struct nan_de_service *srv,\n \t\t\t u8 req_instance_id, u16 sdea_control,\n \t\t\t enum nan_service_protocol_type srv_proto_type,\n \t\t\t const u8 *ssi, size_t ssi_len,\n-\t\t\t bool range_limit, int rssi)\n+\t\t\t bool range_limit, int rssi,\n+\t\t\t const u8 *buf, size_t buf_len)\n {\n+\t/* The SCIA can potentially contain a PMKID for each cipher suite */\n+\tu8 pmkid_list[(NAN_CS_MAX - 1) * PMKID_LEN];\n+\tsize_t pmkid_count = 0;\n+\n \tif (!nan_de_filter_match(srv, matching_filter, matching_filter_len))\n \t\treturn false;\n \n@@ -1311,13 +1376,22 @@ static bool nan_de_rx_publish(struct nan_de *de, struct nan_de_service *srv,\n \t}\n \n send_event:\n+\t/* Parse Security Context Information attribute for PMKIDs */\n+\tif (buf && buf_len > 0) {\n+\t\tpmkid_count = nan_de_parse_scia(buf, buf_len, instance_id,\n+\t\t\t\t\t\tpmkid_list,\n+\t\t\t\t\t\tsizeof(pmkid_list) / PMKID_LEN);\n+\t}\n+\n \tif (de->cb.discovery_result)\n \t\tde->cb.discovery_result(\n \t\t\tde->cb.ctx, srv->id, srv_proto_type,\n \t\t\tssi, ssi_len, instance_id,\n \t\t\tpeer_addr,\n \t\t\tsdea_control & NAN_SDEA_CTRL_FSD_REQ,\n-\t\t\tsdea_control & NAN_SDEA_CTRL_FSD_GAS);\n+\t\t\tsdea_control & NAN_SDEA_CTRL_FSD_GAS,\n+\t\t\tpmkid_count > 0 ? pmkid_list : NULL,\n+\t\t\tpmkid_count);\n \n \treturn true;\n }\n@@ -1626,7 +1700,7 @@ static bool nan_de_rx_sda(struct nan_de *de, const u8 *peer_addr, const u8 *a3,\n \t\t\t\treq_instance_id, sdea_control, srv_proto_type,\n \t\t\t\tssi, ssi_len,\n \t\t\t\tctrl & NAN_SRV_CTRL_DISCOVERY_RANGE_LIMITED,\n-\t\t\t\trssi);\n+\t\t\t\trssi, buf, len);\n \t\t\tbreak;\n \t\tcase NAN_SRV_CTRL_SUBSCRIBE:\n \t\t\tret |= nan_de_rx_subscribe(\ndiff --git a/src/common/nan_de.h b/src/common/nan_de.h\nindex 8af1bb2bc5..de7f08e7ea 100644\n--- a/src/common/nan_de.h\n+++ b/src/common/nan_de.h\n@@ -37,7 +37,8 @@ struct nan_callbacks {\n \t\t\t\t enum nan_service_protocol_type srv_proto_type,\n \t\t\t\t const u8 *ssi, size_t ssi_len,\n \t\t\t\t int peer_publish_id,\n-\t\t\t\t const u8 *peer_addr, bool fsd, bool fsd_gas);\n+\t\t\t\t const u8 *peer_addr, bool fsd, bool fsd_gas,\n+\t\t\t\t const u8 *pmkid_list, size_t pmkid_count);\n \n \tvoid (*replied)(void *ctx, int publish_id, const u8 *peer_addr,\n \t\t\tint peer_subscribe_id,\ndiff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c\nindex 769208f7c5..47a33ddd1e 100644\n--- a/wpa_supplicant/nan_supplicant.c\n+++ b/wpa_supplicant/nan_supplicant.c\n@@ -3138,7 +3138,8 @@ static void\n wpas_nan_de_discovery_result(void *ctx, int subscribe_id,\n \t\t\t enum nan_service_protocol_type srv_proto_type,\n \t\t\t const u8 *ssi, size_t ssi_len, int peer_publish_id,\n-\t\t\t const u8 *peer_addr, bool fsd, bool fsd_gas)\n+\t\t\t const u8 *peer_addr, bool fsd, bool fsd_gas,\n+\t\t\t const u8 *pmkid_list, size_t pmkid_count)\n {\n \tstruct wpa_supplicant *wpa_s = ctx;\n \n", "prefixes": [ "53/92" ] }