{"id":2229862,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2229862/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/patch/20260428200639.40243-54-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-54-andrei.otcheretianski@intel.com>","date":"2026-04-28T20:05:54","name":"[RFC,53/97] tests: Add NDP reconnection after termination test","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"5708dd7fe2546e16e536ca0ef1a1c0fecfdfc1ee","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-54-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/2229862/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2229862/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=PpnQPu90;\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=RrIY+wfk;\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=bEaggzVO;\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 4g4s710Hqcz1xrS\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 06:12:45 +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 1wHomt-00000002IRX-0GQS;\n\tTue, 28 Apr 2026 20:12:07 +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 1wHokC-00000002Ekb-0F9m\n\tfor hostap@bombadil.infradead.org;\n\tTue, 28 Apr 2026 20:09:20 +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 1wHok4-00000004NBq-1fvp\n\tfor hostap@lists.infradead.org;\n\tTue, 28 Apr 2026 20:09:17 +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:36 -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:35 -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=XKA2QJhVlk1/xE9D7w8SerrJE6oVZswETMSjNC+5Jy0=; b=PpnQPu90/tGUhv\n\tbLolpYo5/J17/hwuB/YPmZJv6ql2HlT7Ya2uO5BqoHO/DSsg8Uxi3xS0ZL8PJy7lqXVyJnT+FroSr\n\t+oLuBolRYfTToHPeSQf/atcX0lfxGGN/ZSsYtpcQcZl2jnCYf9UVsaKyr6us9+vAdPZAu8eJBZ7Zn\n\t0SgUnfslCbSBD2rmtE7aurP+mOldnay207lYWnVlFl6YYxbUCU8uANaOxIK6vy48rjGBOpltw5LTf\n\t8zLqcCgyiemQB84Y/IZtQTcOGPl5AIkoemJDdhtJc7A8kDbL9U/VM750YPm+I6liEsQtEtQecCWfT\n\t4pBdu38wkkOYVHYWV2Gg==;","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=JvKBhhwn0zN65RQ1TvCDpSamdQ28n/CJBhdBmn4vCFA=; b=RrIY+wfk75D+p4N21h0l2t4nw2\n\tTBdMk7R1YYNN2LW1C4KUK2H+4ZoKWUmypd/mzPZe6Z6Ga+2ava9OqJn1wLMWr4urUUiIbaDLOaT6w\n\twH2+9TySJLgnDdt+0ul+KCqTol+6vRWHNlC1ZHI6/Iu/FybYPbO7WVANQY3M9k397/GW3TEsPko7E\n\tB0LjoINrNKIoGDsuk+XsNhA3i/6rsJSNh+dhN2YzMYPL5KS1U92vUPyaaCKV6MDWUFh+098eYClwa\n\tuoe9FuG+NZk7HmXJgHeWTCUgUY2VU7SA3QFOtlyzTEHaSdJ4y158dmgQMYjICWNOEESXXc8LED/74\n\t2t97KrGA==;","v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1777406952; x=1808942952;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=dFVPiVfPQr2cPeln8VKQLxPx2/NlXOrYkvnm7mTgubk=;\n  b=bEaggzVO6mpqqyI5Sivtd+ob2bxbkUNR9OjQNo2kUk5OvXp2+Z2md3cG\n   TTiBwT4mNwuVAG65Dvuhz5UD8l/Z9DfaIdVRluXZjCtIvyRZSYddfxLpB\n   RI4ItIUP+x/7Lold4Yd4KzkMFOno20WZHjaHXOIiCeGh2FNAX69VKIIBS\n   vYv8YjJ5dofaPyfrtljO1mW6yM3lIb68vqfOfj20fW4viWTdoDh8uC0VL\n   eaZ8rD92nxBPZ+gfwUsWcCOKL5YQzcbcClpI1hBCFrNZ7EeXAGybXssQN\n   h5agpxtSVrTzLLSqQ0oLXeNrzhDkXfQyRFDG1vHHjlF18NMpHIS7KT3mu\n   g==;"],"X-CSE-ConnectionGUID":["mdcXww8uTP+AX13zDN9Szw==","iZBFnG3kTlaEMkJQkU3/XA=="],"X-CSE-MsgGUID":["4pfu0IZkTrioWq9ITx4IUw==","jPPva0PtRJuYtoR6jkNDqA=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11770\"; a=\"78519455\"","E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"78519455\"","E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"257610527\""],"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":"[RFC 53/97] tests: Add NDP reconnection after termination test","Date":"Tue, 28 Apr 2026 23:05:54 +0300","Message-ID":"<20260428200639.40243-54-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_210913_197876_39B727A1 ","X-CRM114-Status":"UNSURE (   7.34  )","X-CRM114-Notice":"Please train this message.","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":"Add test_nan_ndp_reconnect_after_terminate to verify that NDP\nreconnection works correctly after the first NDP is terminated.\n\nSigned-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>\n---\n tests/hwsim/test_nan.py | 53 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 53 insertions(+)","diff":"diff --git a/tests/hwsim/test_nan.py b/tests/hwsim/test_nan.py\nindex 092370eece..2c21110a15 100644\n--- a/tests/hwsim/test_nan.py\n+++ b/tests/hwsim/test_nan.py\n@@ -1712,3 +1712,56 @@ def test_nan_pairing_bootstrap_ndp_sk_ccmp128(dev, apdev, params):\n         _run_nan_pairing_bootstrap_ndp(\"SAE\", password=\"password123\", csid=1)\n     finally:\n         set_country(\"00\")\n+\n+def _run_nan_ndp_reconnect_after_terminate():\n+    pwd = \"NAN\"\n+    csid1 = 1  # SK CCMP-128\n+    csid2 = 2  # SK GCMP-256\n+\n+    with hwsim_nan_radios() as (wpas1, wpas2), \\\n+        NanDevice(wpas1, \"nan0\", \"ndi0\") as pub, NanDevice(wpas2, \"nan1\", \"ndi1\") as sub:\n+\n+        pssi = \"aabbccdd001122334455667788\"\n+        sssi = \"ddbbccaa001122334455667788\"\n+\n+        # First service discovery and NDP\n+        pid, sid, paddr, saddr = _nan_discover_service(pub, sub, \"test_service\", pssi, sssi, ttl=10)\n+\n+        logger.info(\"Starting first NDP connection...\")\n+        ndp_id1, init_ndi1 = _nan_ndp_request_and_accept(pub, sub, pid, sid, paddr, saddr,\n+                                                         req_ssi=\"aabbcc\", resp_ssi=\"ddeeff\",\n+                                                         csid=csid1, password=pwd,\n+                                                         configure_schedule=True)\n+\n+        logger.info(f\"First NDP established: ndp_id={ndp_id1}, init_ndi={init_ndi1}\")\n+        _nan_test_connectivity(pub, sub)\n+\n+        # Terminate the first NDP\n+        logger.info(\"Terminating first NDP...\")\n+        _nan_ndp_terminate(pub, sub, paddr, init_ndi1, ndp_id1)\n+        logger.info(\"First NDP terminated\")\n+\n+        # Clear any pending events\n+        pub.wpas.dump_monitor()\n+        sub.wpas.dump_monitor()\n+\n+        # Second NDP with password\n+        logger.info(\"Starting second NDP connection (reconnect after terminate)...\")\n+        ndp_id2, init_ndi2 = _nan_ndp_request_and_accept(pub, sub, pid, sid, paddr, saddr,\n+                                                         req_ssi=\"112233\", resp_ssi=\"445566\",\n+                                                         csid=csid2, password=pwd,\n+                                                         configure_schedule=False)\n+\n+        logger.info(f\"Second NDP established: ndp_id={ndp_id2}, init_ndi={init_ndi2}\")\n+        _nan_test_connectivity(pub, sub)\n+\n+        # Cleanup\n+        _nan_ndp_terminate(pub, sub, paddr, init_ndi2, ndp_id2)\n+\n+def test_nan_ndp_reconnect_after_terminate(dev, apdev, params):\n+    \"\"\"NAN NDP reconnection after termination\"\"\"\n+    set_country(\"US\")\n+    try:\n+        _run_nan_ndp_reconnect_after_terminate()\n+    finally:\n+        set_country(\"00\")\n","prefixes":["RFC","53/97"]}