get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2226398/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2226398,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2226398/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/hostap/patch/20260422122424.43776-50-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-50-andrei.otcheretianski@intel.com>",
    "list_archive_url": null,
    "date": "2026-04-22T12:23:40",
    "name": "[49/92] NAN: Add function for creating a list of PMKIDs for a given PMK",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "9959e1722119b54fe6136b422e1b3f27e327709d",
    "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-50-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/2226398/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226398/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=vthiLJFe;\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=Rzp5jPjh;\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 4g0z6f4wppz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 22:28:58 +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 1wFWgs-0000000A7Pw-2r56;\n\tWed, 22 Apr 2026 12:28:26 +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 1wFWf0-0000000A3P1-49rj\n\tfor hostap@lists.infradead.org;\n\tWed, 22 Apr 2026 12:26:44 +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:25:54 -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:25:53 -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=lNMKv/eZmIRVwynKzyYnUgiJCwG/YYhWdts71E7ZOog=; b=vthiLJFeI8sPeD\n\ti9oOMZWPQqKe+jqHBLrB7QXvH8m6BRa7HIRdGx5XddpGYbBJLAFs1j+pnku+q/Hqo6DtvYH3V/25u\n\tmJhP0QhppLrGoueG9rEOWun/PCZPS+YomFRARt88i3jh6YhiVl3VNsAG2aw0ev95vqwtYO2RYyzXc\n\tqsxqmtzygKxbtRlXvHCdsnvESHcbGue5vaomXwSnDpsB8vcxlX3suLB/RIPU/ZxsX+WuVXM55nCcY\n\t8ZoXwgFHMYAqF3a3y3iRYEgttYrq9sv+6/QHjH08YN7tU3rbqjaNGKyknHP+EDROcSS+fsRe3Pyj0\n\t1z/5k2f+V0cGqOW16AWA==;",
            "v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1776860791; x=1808396791;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=i4nE500ptrmVvPpb5OuGLJXYLJ2Vbr6Zl4ACRVty1Mc=;\n  b=Rzp5jPjhtBIzB/H6U0+HyY2jmxzENa/buhkbaKEjJDGsVlLepDJYYFXF\n   QWuUcTc6n1q9OBn7DiYC1RzMjrC4ieWQ9aGQISanN0LoyktB+zv3h6uBr\n   VWLkS3eWhhVanCVPLP11EIW6Qybv64cDcM2UwS/PH+I2jGrmxnh29V09K\n   VHJVY37hgs1HO+Nw54xRGWQyzqfH1UIe7F2vT00Ir6P8gIYhC25WnZORP\n   mK1gyBu+tAIRoOj1Hu47nNyu81F6qMfvY9LspZPvw824X+s05R2hegTl3\n   pwP3Lq5bAR0cqdXS6CFejdzxINNz4q2e81se9UZUU6dXb398d+pI1nrH4\n   Q==;"
        ],
        "X-CSE-ConnectionGUID": [
            "Qztll4PiRPm1bUdLz+dC4w==",
            "Q9rVSADIRPqNSdSgaeQ6ww=="
        ],
        "X-CSE-MsgGUID": [
            "1cZ2vCpcRhWxAtqvziODtA==",
            "mxtcM4bBRH690ej3FWlZug=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11764\"; a=\"77687391\"",
            "E=Sophos;i=\"6.23,192,1770624000\";\n   d=\"scan'208\";a=\"77687391\"",
            "E=Sophos;i=\"6.23,192,1770624000\";\n   d=\"scan'208\";a=\"231445095\""
        ],
        "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 49/92] NAN: Add function for creating a list of PMKIDs for a\n given PMK",
        "Date": "Wed, 22 Apr 2026 15:23:40 +0300",
        "Message-ID": "<20260422122424.43776-50-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_052631_215188_4F3F002E ",
        "X-CRM114-Status": "GOOD (  17.27  )",
        "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> The\n derivation\n    of the ND-PMKID from the PMK depends on the cipher suite used, thus for a\n    given PMK multiple PMKIDs may need to be derived based on the supported\n cipher\n    suites. Add a function to create [...]\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\nThe derivation of the ND-PMKID from the PMK depends on the cipher\nsuite used, thus for a given PMK multiple PMKIDs may need to be\nderived based on the supported cipher suites.\nAdd a function to create a list of the PMKIDs that correspond to\na given PMK based on a list of supported cipher suites.\n\nSigned-off-by: Avraham Stern <avraham.stern@intel.com>\n---\n src/nan/nan_crypto.c | 69 ++++++++++++++++++++++++++++++++++++++++++++\n src/nan/nan_i.h      |  8 +++++\n 2 files changed, 77 insertions(+)",
    "diff": "diff --git a/src/nan/nan_crypto.c b/src/nan/nan_crypto.c\nindex 31702f5e9e..c0aea20c90 100644\n--- a/src/nan/nan_crypto.c\n+++ b/src/nan/nan_crypto.c\n@@ -672,3 +672,72 @@ struct wpabuf *nan_crypto_decrypt_key_data(const u8 *kek, size_t kek_len,\n \n \treturn decrypted;\n }\n+\n+\n+/*\n+ * nan_crypto_clear_pmkid_list - Clear and free all entries in a PMKID list\n+ *\n+ * @pmkid_list: List of PMKIDs to clear\n+ *\n+ * This function removes and frees all PMKID entries from the provided list.\n+ */\n+void nan_crypto_clear_pmkid_list(struct dl_list *pmkid_list)\n+{\n+\tstruct nan_de_pmkid *p, *n;\n+\n+\tdl_list_for_each_safe(p, n, pmkid_list, struct nan_de_pmkid, list) {\n+\t\tdl_list_del(&p->list);\n+\t\tos_free(p);\n+\t}\n+}\n+\n+\n+/*\n+ * nan_crypto_pmkid_list - Generate PMKIDs for multiple cipher suites\n+ *\n+ * @pmkid_list: List to append generated PMKIDs to\n+ * @raddr: Responder MAC address\n+ * @srv_id: Service ID (6 bytes)\n+ * @cipher_suites: Array of cipher suite identifiers (0 terminated)\n+ * @pmk: Pairwise Master Key to generate PMKIDs from\n+ * Returns: 0 on success, -1 on failure\n+ *\n+ * This function generates a PMKID for each cipher suite in the provided array\n+ * and adds them to the pmkid_list.\n+ */\n+int nan_crypto_pmkid_list(struct dl_list *pmkid_list, const u8 *raddr,\n+\t\t\t  const u8 *srv_id, const int *cipher_suites,\n+\t\t\t  const u8 *pmk)\n+{\n+\tsize_t cs_num = int_array_len(cipher_suites);\n+\tsize_t i;\n+\n+\tif (!cs_num || !pmk)\n+\t\treturn 0;\n+\n+\tfor (i = 0; i < cs_num; i++) {\n+\t\tstruct nan_de_pmkid *p;\n+\t\tint ret;\n+\t\tu8 iaddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};\n+\t\tenum nan_cipher_suite_id csid =\n+\t\t\t(enum nan_cipher_suite_id)cipher_suites[i];\n+\n+\t\tp = os_zalloc(sizeof(*p));\n+\t\tif (!p)\n+\t\t\treturn -1;\n+\n+\t\tret = nan_crypto_calc_pmkid(pmk, iaddr, raddr, srv_id, csid,\n+\t\t\t\t\t    p->pmkid);\n+\t\tif (ret < 0) {\n+\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t   \"NAN: Failed to derive PMKID for cipher suite %d\",\n+\t\t\t\t   cipher_suites[i]);\n+\t\t\tnan_crypto_clear_pmkid_list(pmkid_list);\n+\t\t\treturn ret;\n+\t\t}\n+\n+\t\tdl_list_add(pmkid_list, &p->list);\n+\t}\n+\n+\treturn 0;\n+}\ndiff --git a/src/nan/nan_i.h b/src/nan/nan_i.h\nindex eedf6c2389..9c6ff10cab 100644\n--- a/src/nan/nan_i.h\n+++ b/src/nan/nan_i.h\n@@ -636,6 +636,10 @@ static inline u8 nan_get_next_ndp_id(struct nan_data *nan)\n \treturn nan->ndp_id_counter;\n }\n \n+struct nan_de_pmkid {\n+\tstruct dl_list list;\n+\tu8 pmkid[PMKID_LEN];\n+};\n \n struct nan_peer * nan_get_peer(struct nan_data *nan, const u8 *addr);\n bool nan_is_naf(const struct ieee80211_mgmt *mgmt, size_t len);\n@@ -746,6 +750,10 @@ struct wpabuf *nan_crypto_encrypt_key_data(const struct wpabuf *key_data,\n struct wpabuf *nan_crypto_decrypt_key_data(const u8 *kek, size_t kek_len,\n \t\t\t\t\t   const u8 *encrypted_data,\n \t\t\t\t\t   size_t encrypted_len);\n+int nan_crypto_pmkid_list(struct dl_list *pmkid_list, const u8 *raddr,\n+\t\t\t  const u8 *srv_id, const int *cipher_suites_list,\n+\t\t\t  const u8 *pmk);\n+void nan_crypto_clear_pmkid_list(struct dl_list *pmkid_list);\n \n \n void nan_sec_reset(struct nan_data *nan, struct nan_ndp_sec *ndp_sec);\n",
    "prefixes": [
        "49/92"
    ]
}