From nobody Tue Nov 05 02:50:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XjCWH55TBz5ctlc; Tue, 05 Nov 2024 02:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XjCWH4Yg7z465D; Tue, 5 Nov 2024 02:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730775035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yyr26AzLHT0+ch2EgFtNJrEauotj4QT7566YOlu0Shw=; b=RAnO7DSp0OrCqToHwe50U38l3jnyh+I8pM8X/1tmHkQoLJY+ilfSkI1+bJj653BnrH5cDK RDneKOdYT7w1xGLoS70aaNdeBR2qQyF2ldbEytMwlGNK1REBxvDpbL/ATHqynjl+Py5Bx+ lVIfkSghRm5E0+OibTzZLG0m+154+J6akYOCFZM4BWpYzIGX+fkNAodcAFzyX4eJlES0HR CsRh1jhcXPa70w7xMmqh1oVaE/HApnvYt21SOI0kQu/R8gyjBUJl1wuTGUotKct0w2yjEO e+VH3gonHCwIAEOu2IAZYReLang9pTMI8CLYK8D6djtF1zpqYa8NyBwqkfHSWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730775035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yyr26AzLHT0+ch2EgFtNJrEauotj4QT7566YOlu0Shw=; b=iiQck/RCxl/El6FIkfKM3QTtE+41JcRvkWih9av2toLcY4KdndyrQXTu1/TA+vMI/GRYDQ PXrCiY3ldHky0FJQM+/csJetDCHE+U+VoG6useU0lnVUUV5BAlpKKjy0gHJ/rEGxLuaL7T dzVnHgtxzhdPvszettX1LclqlEI1wajAkOEx5e/lcZhq5ZgEUAYgbfSUtjGLqBZ84xjTGn zVB9MH0D9u5T70LGSHn0sOZMbeHzkreow39mV8f4wbuzycGyIeOs26kvyxpOxmL+TovXJf OKdO+iAnTNcQjgF7P3s1W1KG+Whfuf/6CDgI6sc15SPVDD7qxmj5+b2Le+2PBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730775035; a=rsa-sha256; cv=none; b=L5VsGeYQylzeFdycW7EVCduPOMh+8ZJCu/QM8gFw97PapW6/26r13UulXwkuuATH3gUooK 99dOAKsly7OnP/jCFDaXdLj6JXX8Ru0WNeU89VIBULC+rmJQJm6Vi5jAnFAKrPeuS6YHds 7QeQ6EtZscRYJ+84zEuaBk3mh7Oar3NNynRs5VEWYlLqC7udNf/ifLIIlgRsYgzcdhqevk hUQLAeSqRtRDvIhLe3kYxet9kIo8odh7b94iPVC9QPLMIdTZ/qj7FbyWNeE2Ey9MJe6bTW 6M7lqM5UjFxW7r1zLFh2aQCIrJ3DFQJRUcb68ik8HCI4Lt5BKSHcVLLW9MW8Eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XjCWH48wPz10SZ; Tue, 5 Nov 2024 02:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4A52oZ6x089111; Tue, 5 Nov 2024 02:50:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A52oZcR089108; Tue, 5 Nov 2024 02:50:35 GMT (envelope-from git) Date: Tue, 5 Nov 2024 02:50:35 GMT Message-Id: <202411050250.4A52oZcR089108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 2e29bf7a2ae6 - main - ping: tests: Cleanup IPOption()s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e29bf7a2ae66acb6e65ffc1c923cfb373af67bd Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2e29bf7a2ae66acb6e65ffc1c923cfb373af67bd commit 2e29bf7a2ae66acb6e65ffc1c923cfb373af67bd Author: Jose Luis Duran AuthorDate: 2024-11-05 02:46:45 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-05 02:46:45 +0000 ping: tests: Cleanup IPOption()s Scapy now only accepts known options with IPOption(), so our unknown option must be passed raw. While here, prefer the named options for EOL and NOP. Reviewed by: emaste, kp Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D47160 --- sbin/ping/tests/test_ping.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 8ec0f3dc74dc..90df07d0e5b9 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -85,11 +85,11 @@ def generate_ip_options(opts): ] routers_zero = [0, 0, 0, 0, 0, 0, 0, 0, 0] if opts == "EOL": - options = sc.IPOption(b"\x00") + options = sc.IPOption_EOL() elif opts == "NOP": - options = sc.IPOption(b"\x01") + options = sc.IPOption_NOP() elif opts == "NOP-40": - options = sc.IPOption(b"\x01" * 40) + options = sc.IPOption_NOP() * 40 elif opts == "RR": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) options = sc.IPOption_RR(pointer=40, routers=routers) @@ -116,7 +116,7 @@ def generate_ip_options(opts): options = b"\x9f" elif opts == "unk-40": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) - options = sc.IPOption(b"\x9f" * 40) + options = b"\x9f" * 40 else: options = "" return options