{"id":2229853,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229853/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/patch/20260428200639.40243-49-andrei.otcheretianski@intel.com/","project":{"id":22,"url":"http://patchwork.ozlabs.org/api/1.1/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":""},"msgid":"<20260428200639.40243-49-andrei.otcheretianski@intel.com>","date":"2026-04-28T20:05:49","name":"[48/97] NAN: Add a testing configuration for protected NAN multicast follow up","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"6729c7567699c829d14eee61d1f1371707776025","submitter":{"id":62065,"url":"http://patchwork.ozlabs.org/api/1.1/people/62065/?format=json","name":"Andrei Otcheretianski","email":"andrei.otcheretianski@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/hostap/patch/20260428200639.40243-49-andrei.otcheretianski@intel.com/mbox/","series":[{"id":501927,"url":"http://patchwork.ozlabs.org/api/1.1/series/501927/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/list/?series=501927","date":"2026-04-28T20:05:05","name":"NAN: Group keys support, schedule update and more","version":1,"mbox":"http://patchwork.ozlabs.org/series/501927/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2229853/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2229853/checks/","tags":{},"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=ctNxeWfR;\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=casper.20170209 header.b=DRXVZiRJ;\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=gRp/loqu;\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 4g4s692QKdz1yJH\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 06:12:01 +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 1wHomH-00000002HZl-3VFe;\n\tTue, 28 Apr 2026 20:11:29 +0000","from casper.infradead.org ([2001:8b0:10b:1236::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHojy-00000002EQP-1WxH\n\tfor hostap@bombadil.infradead.org;\n\tTue, 28 Apr 2026 20:09:06 +0000","from mgamail.intel.com ([198.175.65.16])\n\tby casper.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHoju-00000004NBq-2lwF\n\tfor hostap@lists.infradead.org;\n\tTue, 28 Apr 2026 20:09:04 +0000","from fmviesa001.fm.intel.com ([10.60.135.141])\n  by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 13:08:28 -0700","from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com)\n ([10.167.28.6])\n  by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 13:08:27 -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=wPUKB0T7kZqpHpOV+W92b0FlAC+lC077asF+cYRBcRc=; b=ctNxeWfRe8YYie\n\tPLUbJC36hKDKxNeN30xE9+KyMvPukgVEMqXU7mlLgL9CLbNjZOa01vYzF+kE1DUl+OnaKr2AQSByn\n\tr9qPmbhejjamOl2ykX3ChUfrIb29xo2SVAy5WyfGyQblTnUKpwJYs6VjoQR++fuzTQv5dwiyhDa8A\n\tc4/3qGxxMKd2wwVJWtVw3r+7b+O970D6fyC4HltEcc3qfz+yju2kRF9NCAMRadvymuWvmoTWM5l79\n\tGHHqWT5QwTX1G8EkqlX4wF/DAsyB9OvF7OkpzdbpcJiI265MfGUrL3qE0Veu+Fe+iAfpKSvJ4xMOL\n\t32qNQd+zaap4RG5echcw==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version:\n\tReferences:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:\n\tContent-Type:Content-ID:Content-Description;\n\tbh=bhHxkg6DYqicItWuS2fVIJ1wpZrAYcBzTfe5lATa7FI=; b=DRXVZiRJ/7nzzhEKAWBs0f4Dud\n\tC6nuGVUQ2T4ywfb0wIoGuiWSMfrtxhdoAhmdBOwy0xVHYmSot7BBDaxYnBRqzXpgQrxsMr8a/VkpT\n\tP0YvYOJSXOXexkWVBYjhj6/g/Q5xMvtmTOhhdWVT4EG3EgVVFMrvsqpMJccGjQrOhMOKVJV0wLGFW\n\tbOy41sP9o0nTCBbNg6gjswUs0F6R8YmboBe36L5gT8SML3EDKE0ci/4EUIZXAc3HrDs26GAHOkjaH\n\tkcv83ouDTdZasOeQzfk7w9fPJ0Om7Hh9Td5hKJMU1w6ZHdOfOOo15jM+N91JSYK+s7MQc88aKBSxm\n\tv6hLQyZA==;","v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1777406942; x=1808942942;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=6qOmxEruFRgsKk03Lk0b3kdT28jqU0yuB+WkXfGeMCU=;\n  b=gRp/loquebgr9n9OY0a/YGVcgD8POW7vrE0P4/SiHomi8Iajv3fIEfpU\n   1CMfZSA6YK5JY4kJlv57RbEWjfLcEMebJLrLGDM672+aWQPErU45o7frh\n   cXEqfxdtWs9uLns2vZceLmAJVPUu/nju2TapOsyyAEuqpXdBcQZcj3M6o\n   9DK3NWuGGQTKDa9JJIIFLtGvLPIfYE1oHzaA7XiZY+KNz/B8NL1sKWcz9\n   ohqJEjYwfvO3mhRoNbs/w1bYVLqCLVi+4up/ZMSGIvhfS+hcJsjBUdafo\n   kQ8To+wJaGRYPnMxp+TgUPfd6IGtZFwTwJPcMJ5jmqSh9Zg+75o92dI0m\n   A==;"],"X-CSE-ConnectionGUID":["4OU3L13BTCqCcc++LexyOQ==","gbdIufRLT0qouwE2ZqMFLQ=="],"X-CSE-MsgGUID":["9SA5MQYRT6iErI+KT7P1Qg==","waQazmq3Q8+5pn4/v32OBQ=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11770\"; a=\"78519440\"","E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"78519440\"","E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"257610497\""],"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\tIlan Peer <ilan.peer@intel.com>","Subject":"[PATCH 48/97] NAN: Add a testing configuration for protected NAN\n multicast follow up","Date":"Tue, 28 Apr 2026 23:05:49 +0300","Message-ID":"<20260428200639.40243-49-andrei.otcheretianski@intel.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260428200639.40243-1-andrei.otcheretianski@intel.com>","References":"<20260428200639.40243-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-20260428_210903_036912_DC6923EF ","X-CRM114-Status":"GOOD (  15.17  )","X-Spam-Score":"-4.4 (----)","X-Spam-Report":"SpamAssassin version 4.0.1 on casper.infradead.org summary:\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                             [198.175.65.16 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_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 -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\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: Ilan Peer <ilan.peer@intel.com>\n\nAdd a testing configuration, that when enabled would send NAN\nmulticast follow up frames as dual protected.\n\nSigned-off-by: Ilan Peer <ilan.peer@intel.com>\n---\n src/common/nan_de.c             | 40 +++++++++++++++++++++++++++++++--\n src/common/nan_de.h             |  2 ++\n wpa_supplicant/nan_supplicant.c |  9 ++++++++\n 3 files changed, 49 insertions(+), 2 deletions(-)","diff":"diff --git a/src/common/nan_de.c b/src/common/nan_de.c\nindex 0e2fb8a854..f9715a0cdc 100644\n--- a/src/common/nan_de.c\n+++ b/src/common/nan_de.c\n@@ -130,6 +130,15 @@ struct nan_de {\n \n \t/* RSSI threshold for close proximity, or zero if not limited */\n \tint rssi_threshold;\n+\n+#ifdef CONFIG_TESTING_OPTIONS\n+\t/*\n+\t * When set, multicast follow up SDFs would be sent as\n+\t * Protected Dual of Public. This can be used to test protection\n+\t * of NAN multicast management frames.\n+\t */\n+\tbool tx_mcast_fu_dual_prot;\n+#endif /* CONFIG_TESTING_OPTIONS */\n };\n \n \n@@ -249,8 +258,10 @@ static void nan_de_unpause_state(struct nan_de_service *srv)\n \tsrv->sel_peer_id = 0;\n }\n \n+\n static struct wpabuf * nan_de_alloc_sdf(struct nan_de *de, const u8 *dst,\n-\t\t\t\t\tsize_t len)\n+\t\t\t\t        size_t len,\n+\t\t\t\t        enum nan_service_control_type type)\n {\n \tstruct wpabuf *buf;\n \tu8 category = WLAN_ACTION_PUBLIC;\n@@ -258,6 +269,16 @@ static struct wpabuf * nan_de_alloc_sdf(struct nan_de *de, const u8 *dst,\n \tif (de->cb.is_peer_paired && de->cb.is_peer_paired(de->cb.ctx, dst))\n \t\tcategory = WLAN_ACTION_PROTECTED_DUAL;\n \n+#ifdef CONFIG_TESTING_OPTIONS\n+\tif (de->tx_mcast_fu_dual_prot &&\n+\t    is_multicast_ether_addr(dst) &&\n+\t    type == NAN_SRV_CTRL_FOLLOW_UP) {\n+\t\twpa_printf(MSG_DEBUG,\n+\t\t\t   \"NAN: Send multicast followup as protected DUAL\");\n+\t\tcategory = WLAN_ACTION_PROTECTED_DUAL;\n+\t}\n+#endif /* CONFIG_TESTING_OPTIONS */\n+\n \tbuf = wpabuf_alloc(2 + 4 + len);\n \tif (buf) {\n \t\twpabuf_put_u8(buf, category);\n@@ -378,7 +399,7 @@ static void nan_de_tx_sdf(struct nan_de *de, struct nan_de_service *srv,\n \t\t\tlist_len * (sizeof(struct nan_sec_ctxt) + PMKID_LEN);\n \t}\n \n-\tbuf = nan_de_alloc_sdf(de, dst, len);\n+\tbuf = nan_de_alloc_sdf(de, dst, len, type);\n \tif (!buf)\n \t\treturn;\n \n@@ -2623,3 +2644,18 @@ bool nan_de_service_supports_csid(struct nan_de *de, int handle, int csid)\n \t/* Check if the CSID is in the service's cipher suite list */\n \treturn int_array_includes(srv->cipher_suites_list, csid);\n }\n+\n+#ifdef CONFIG_TESTING_OPTIONS\n+\n+void nan_de_set_tx_mcast_fu_dual_prot(struct nan_de *de,\n+\t\t\t\t      bool tx_mcast_fu_dual_prot)\n+{\n+\twpa_printf(MSG_DEBUG,\n+\t\t   \"NAN: Set tx_mcast_follow_up_dual_prot: %u->%u\",\n+\t\t   de->tx_mcast_fu_dual_prot,\n+\t\t   tx_mcast_fu_dual_prot);\n+\n+\tde->tx_mcast_fu_dual_prot = tx_mcast_fu_dual_prot;\n+}\n+\n+#endif /* CONFIG_TESTING_OPTIONS */\ndiff --git a/src/common/nan_de.h b/src/common/nan_de.h\nindex e376725191..3acda64a44 100644\n--- a/src/common/nan_de.h\n+++ b/src/common/nan_de.h\n@@ -273,6 +273,8 @@ bool nan_de_is_valid_instance_id(struct nan_de *de, int handle,\n \t\t\t\t bool publish, u8 *service_id);\n u16 nan_de_get_service_bootstrap_methods(struct nan_de *de, int handle);\n bool nan_de_service_supports_csid(struct nan_de *de, int handle, int csid);\n+void nan_de_set_tx_mcast_fu_dual_prot(struct nan_de *de,\n+\t\t\t\t      bool tx_mcast_fu_dual_prot);\n \n int nan_de_stop_listen(struct nan_de *de, int handle);\n \ndiff --git a/wpa_supplicant/nan_supplicant.c b/wpa_supplicant/nan_supplicant.c\nindex 4acd636c32..2559613d7f 100644\n--- a/wpa_supplicant/nan_supplicant.c\n+++ b/wpa_supplicant/nan_supplicant.c\n@@ -1673,6 +1673,15 @@ int wpas_nan_set(struct wpa_supplicant *wpa_s, char *cmd)\n \t\treturn nan_set_mgmt_group_cipher(wpa_s->nan, cipher);\n \t}\n \n+#ifdef CONFIG_TESTING_OPTIONS\n+\tif (os_strcmp(\"tx_mcast_fu_dual_prot\", cmd) == 0) {\n+\t\tbool val = !!atoi(param);\n+\n+\t\tnan_de_set_tx_mcast_fu_dual_prot(wpa_s->nan_de, val);\n+\t\treturn 0;\n+\t}\n+#endif /* CONFIG_TESTING_OPTIONS */\n+\n \twpa_printf(MSG_INFO, \"NAN: Unknown NAN_SET cmd='%s'\", cmd);\n \treturn -1;\n }\n","prefixes":["48/97"]}