From patchwork Fri Sep 27 09:36:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 1990193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=AhRulR9e; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=p/GTxrf4; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XFQPP1tjxz1xtL for ; Fri, 27 Sep 2024 19:38:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EVgqJwN/aJKGnaBcwoiBiTpDdN81RVSmzYTwid+3KQI=; b=AhRulR9emrWBnv adEnzXwNUFXawIhQKfj2c8Q2fCFrAUiHxTnbNtvP9qjXloSHScjeTemX86YU4IfjqHapkPQEHgQ+e A5huY97Q1LDjXHcP71ujDNF6y90Hv8tuyYFujjA4IiwMC6Tq/mwasoKdsyBSCw5iiN7TeKmWPy4/a bYQUnHsF8UhMBsagXBH49vK+04dlEk5r8sYsSC7Voscz3GxLs/sfOBzGyk4u+Jzo8YCopHK64F9BG BkQY2+MAYa2sQCMZxYf1ZX39LsQviyAcdpaEVR0eE9f4xZVXvA7F4ow4pkozmRcgINn3brR8y9xkQ /6UGz7tuzP3xQnl5/H4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1su7Pd-0000000Ag5w-1rKb; Fri, 27 Sep 2024 09:37:21 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1su7PH-0000000Afyj-1Qzs for hostap@lists.infradead.org; Fri, 27 Sep 2024 09:37:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=glEApyhv9/lwe9tq3JeLkvi1v7T1sViT5YAuRkiD8hY=; t=1727429817; x=1728639417; b=p/GTxrf4LMWJNNYWDQ9/CyWJpmp748BtyagjFz6n/7iANPp1K4gXgSpr4ImjSaVXh9sNmRFl34P Tp4m7rB8aui578HCZ89Ww4RhoRaHF1/SFz4SJIGRehKaFcQ9e0DZt6ShgYCBS5+cbcugKzPRoi6CT 83I8JuwjxTSLAde2RCQHuAwB8FTAvuE+2Tbvs96T6MzFV0IJCAuWDZyLxmxIpGNZEEXYKzF9lbErB ak2TG1RELkrWFKnpaRRvdno88GDJlc9dHc9NT1h7tB0PhmvYAmZ8/ItGvDl6mkzpXCeXWD1bftAW5 aofor6TrPAEAnsJe3KUKhnA6OqG8Qqk1oX5w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1su7PB-00000003b5M-00lk; Fri, 27 Sep 2024 11:36:53 +0200 From: Benjamin Berg To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 1/3] tests: Fix race condition in test_fst_setup_mbie_diff Date: Fri, 27 Sep 2024 11:36:20 +0200 Message-ID: <20240927093622.883806-1-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.46.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240927_023659_409808_B6ECE214 X-CRM114-Status: GOOD ( 10.22 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Benjamin Berg The allocation failure could be checked before the operation had completed. Fix this by enabling the wait in the call to fst_setup_req. Signed-off-by: Benjamin Berg --- tests/hwsim/test_fst_module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Benjamin Berg The allocation failure could be checked before the operation had completed. Fix this by enabling the wait in the call to fst_setup_req. Signed-off-by: Benjamin Berg --- tests/hwsim/test_fst_module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_fst_module.py b/tests/hwsim/test_fst_module.py index 589a87c543..5c0d365909 100644 --- a/tests/hwsim/test_fst_module.py +++ b/tests/hwsim/test_fst_module.py @@ -2542,8 +2542,11 @@ def _test_fst_setup_mbie_diff(dev, apdev, test_params): mbie = "9e16040200010200000004000000000000000000000000ff" try: with alloc_fail(hapd, 1, "mb_ies_by_info"): + # If no_wait is set to True an explicit wait would need to be + # inserted to ensure the failure was triggered. However, as the + # setup succeeds (currently), we can simply do the wait here. fst_setup_req(wpas, hglobal, 5180, apdev[0]['bssid'], req, stie, - mbie, no_wait=True) + mbie, no_wait=False) except HwsimSkip as e: # Skip exception to allow proper cleanup pass From patchwork Fri Sep 27 09:36:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 1990192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=dHYuRBOZ; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=h+uA4qwI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XFQPP1hFFz1xtK for ; Fri, 27 Sep 2024 19:38:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PBaB4gRQHKLHGM8pBOgOWzjDQwqXmDEVjFDK83+Y9s8=; b=dHYuRBOZG2+hC4 L/jLLlLYB2AlsKFYlhZwwbM7rDNTxboW1TKI6o6zct2ULptZ80HOK891p4kdHafRgxMf702l6+8jJ Knm7ZDTIslfJjdaMAzqQT56ov9/dsQZ89S0tIeEeG+RCM9XCFRkNo05FwqM2ItRkgTLdSmUQIafQK 4d2i1PCIObBZYlllvnO81H9brnXQduhrNi8ZCjVoRt3kg+07B6aZnFII1rmx9uNPEk1y+pV1X/USt kH6a0mzoIY7/KSYJlVi1tk7Ub7WmElwjDCpG5V8wJcEh6ZFZVOrgHsG5cETIEnau14FevBoJKeH49 ZzlT5hT9icG83aU+y1Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1su7Pe-0000000Ag6U-2lkY; Fri, 27 Sep 2024 09:37:22 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1su7PH-0000000Afyt-2CiQ for hostap@lists.infradead.org; Fri, 27 Sep 2024 09:37:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=vb9n8p/LJ1GP8ifF2evoCDdU7s89d/6MXLwyhQrpQRw=; t=1727429817; x=1728639417; b=h+uA4qwIahjCnZ5pXhXaRIZVKNK2kamzKrUwUfAyD0ON87T a3m9UTEt/SFL57WwPHI7Oj7dpEmsdw2AG0FbTq0SQ+W2ANLYmrQeX83UZlXSwa903HcD4CTKGIiH9 a5zGs+tHJXDX5hjTgzFYWt404anUi1RjGEctf7vskU1GWZsEzKZbsygjjq6JcdmqDlaMbHvOryVm0 ppwjxfvswmmvWZs3CRnb9jINvZB9SB+oI7l4qHIq0pkJg+Px+n4NzQhypcPB1E+DWEQrZ/FDA1LnX umwzwdbzW106vECzRzRHyDHVTCFlYOqJzMkhCUFlo7tfIDawrC46fovfOzvAlLrA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1su7PC-00000003b5M-1rIT; Fri, 27 Sep 2024 11:36:54 +0200 From: Benjamin Berg To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 2/3] tests: Insert sleep after DATA_TEST_FRAME where needed Date: Fri, 27 Sep 2024 11:36:21 +0200 Message-ID: <20240927093622.883806-2-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240927093622.883806-1-benjamin@sipsolutions.net> References: <20240927093622.883806-1-benjamin@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240927_023659_607196_E4E76059 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Benjamin Berg If the frame is not fully processed the neighbor entries of the bridge will not yet be updated. Add a sleep to ensure that the tests are not racy. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ap_hs20.py | 13 +++++++++++-- tests/hwsim/test_hs20_filter.py | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Benjamin Berg If the frame is not fully processed the neighbor entries of the bridge will not yet be updated. Add a sleep to ensure that the tests are not racy. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ap_hs20.py | 13 +++++++++++-- tests/hwsim/test_hs20_filter.py | 6 ++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index 35cb0b8fe9..8b6359113e 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -4357,16 +4357,19 @@ def _test_ap_hs20_proxyarp(dev, apdev): if "OK" not in dev[1].request("DATA_TEST_FRAME " + binascii.hexlify(pkt).decode()): raise Exception("DATA_TEST_FRAME failed") + # Wait for frames to be processed + time.sleep(0.1) + matches = get_permanent_neighbors("ap-br0") logger.info("After connect: " + str(matches)) - if len(matches) != 3: - raise Exception("Unexpected number of neighbor entries after connect") if 'aaaa:bbbb:cccc::2 dev ap-br0 lladdr 02:00:00:00:00:00 PERMANENT' not in matches: raise Exception("dev0 addr missing") if 'aaaa:bbbb:dddd::2 dev ap-br0 lladdr 02:00:00:00:01:00 PERMANENT' not in matches: raise Exception("dev1 addr(1) missing") if 'aaaa:bbbb:eeee::2 dev ap-br0 lladdr 02:00:00:00:01:00 PERMANENT' not in matches: raise Exception("dev1 addr(2) missing") + if len(matches) != 3: + raise Exception("Unexpected number of neighbor entries after connect") dev[0].request("DISCONNECT") dev[1].request("DISCONNECT") time.sleep(0.5) @@ -4489,6 +4492,9 @@ def _test_ap_hs20_proxyarp_dgaf(dev, apdev, disabled): if "OK" not in hapd.request("DATA_TEST_FRAME ifname=ap-br0 " + binascii.hexlify(pkt).decode()): raise Exception("DATA_TEST_FRAME failed") + # Wait for frames to be processed + time.sleep(0.1) + matches = get_permanent_neighbors("ap-br0") logger.info("After connect: " + str(matches)) if len(matches) != 2: @@ -4949,6 +4955,9 @@ def _test_proxyarp_open(dev, apdev, params, ebtables=False): if "OK" not in hapd.request("DATA_TEST_FRAME ifname=ap-br0 " + binascii.hexlify(pkt).decode()): raise Exception("DATA_TEST_FRAME failed") + # Wait for frames to be processed + time.sleep(0.1) + macs = get_bridge_macs("ap-br0") logger.info("After connect (showmacs): " + str(macs)) diff --git a/tests/hwsim/test_hs20_filter.py b/tests/hwsim/test_hs20_filter.py index 11cf347563..b916da567e 100644 --- a/tests/hwsim/test_hs20_filter.py +++ b/tests/hwsim/test_hs20_filter.py @@ -172,6 +172,9 @@ def test_ip4_drop_gratuitous_arp(devs, apdevs, params): if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt): raise Exception("DATA_TEST_FRAME failed") + # Wait for frames to be processed + time.sleep(0.1) + if hapd.own_addr() in subprocess.check_output(['ip', 'neigh', 'show']).decode(): raise Exception("gratuitous ARP frame updated erroneously") finally: @@ -199,6 +202,9 @@ def test_ip6_drop_unsolicited_na(devs, apdevs, params): if "OK" not in hapd.request('DATA_TEST_FRAME ' + pkt): raise Exception("DATA_TEST_FRAME failed") + # Wait for frames to be processed + time.sleep(0.1) + if hapd.own_addr() in subprocess.check_output(['ip', 'neigh', 'show']).decode(): raise Exception("unsolicited NA frame updated erroneously") finally: From patchwork Fri Sep 27 09:36:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 1990191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mtOeoF02; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=esCNDYZJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XFQPP0VHQz1xt9 for ; Fri, 27 Sep 2024 19:38:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l1py02pA4rRZi/kXwHknFX/vFvObeVB9OfdpoHuR2Sc=; b=mtOeoF02DwkA+g Rkc6AXyA+0ZK0bonmdpUzASOozee8qPu61B0APE9Q0s9weQfBVP3Gllf8InOHTaIqX+8gx2UguKA3 PFoMPtB+HtA1mQykCpNd4A/tVvQ1bTRNIhlXHhVziV9+Xjtzs50jdzmN/mVh6gIwY9DroNP28GIPw wKeFZGg4sDkV/jYVPtta+KE+oHNuhoOvQSc+XSC//e6amvdLmIg/Djs2Y67JWk6ue1WlvI1rmhBo7 QNHYPiOWmTAlfzC7RXNkCZS6XqCGkW0CxDdxAC/Rnj2QyS4oYffLdF3yZ5T6WBqKPL/ZJpOl4eNbl t06xxVlxqQtjqxl3PTKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1su7Pf-0000000Ag6q-3ULB; Fri, 27 Sep 2024 09:37:23 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1su7PI-0000000Afz5-222i for hostap@lists.infradead.org; Fri, 27 Sep 2024 09:37:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=e2wtA2ZVq89KbeTMcFfwXCZtqiRmHrxvTGl4ThfTd0k=; t=1727429818; x=1728639418; b=esCNDYZJY9CX3VXpY36usPXWZsIVRQNxPdtDl3UBfCzG8P9 pFWA02mM5k9vpqo5CJSShEQTFUkFbfZrnRkCSE+us5FBMIL4IdWl9yYy8d0ERP9NMdtVeaHa2ZH8h U5TjIkq1MjETe3djgNw15SdZrj4lWLBSg85NmkLgN8phGaB+/0RlNfsHJzUYKlFnkCW8d/r39GwQv Zk5WmOkhE5rXb1dT0hXkqwoVbjtjx3urzrhEAGmvnX11SOxOuRBVwRiYmDl5rnJ4n3empaMrOa1oQ EVM5nU9pcuKmw1Kj/gLIDnyR/gm9jZ9vO5Nf4XuXFjciB78VNZSlKtPuZ41VnIkA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1su7PE-00000003b5M-0OBL; Fri, 27 Sep 2024 11:36:56 +0200 From: Benjamin Berg To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 3/3] tests: Fix rare EAPOL frame ID wrap-around failure Date: Fri, 27 Sep 2024 11:36:22 +0200 Message-ID: <20240927093622.883806-3-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240927093622.883806-1-benjamin@sipsolutions.net> References: <20240927093622.883806-1-benjamin@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240927_023700_608476_7A4E604F X-CRM114-Status: GOOD ( 10.05 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Benjamin Berg In rare cases ieee8021x_set_conf would fail as the ID of the EAPOL frame wrapped around and the frame was not ignored as expected. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ieee8021x.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Benjamin Berg In rare cases ieee8021x_set_conf would fail as the ID of the EAPOL frame wrapped around and the frame was not ignored as expected. Signed-off-by: Benjamin Berg --- tests/hwsim/test_ieee8021x.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ieee8021x.py b/tests/hwsim/test_ieee8021x.py index db0b695765..7453aecba6 100644 --- a/tests/hwsim/test_ieee8021x.py +++ b/tests/hwsim/test_ieee8021x.py @@ -440,7 +440,10 @@ def test_ieee8021x_set_conf(dev, apdev): dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0", eap="PSK", identity="psk.user@example.com", password_hex="0123456789abcdef0123456789abcdef", - scan_freq="2412") + scan_freq="2412", + # The workaround in eap_success_workaround can trigger a + # rare failure when the EAPOL frame ID wraps. + eap_workaround="0") addr0 = dev[0].own_addr() tests = ["EAPOL_SET 1",