git: 2926c2594249 - main - ping tests: fix for scapy-2.6.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Oct 2024 15:31:34 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2926c2594249f64fecbbdcb0b0b9a3591931ab04 commit 2926c2594249f64fecbbdcb0b0b9a3591931ab04 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2024-10-16 07:57:06 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2024-10-16 15:25:57 +0000 ping tests: fix for scapy-2.6.0 Scapy 2.6.0 now appears to parse the IPOption during construction, and it then gets confused at a single-byte option. IP Options typically contain at least a 1 byte type and 1 byte length. Avoid this by just returning the raw bytes, rather than an IPOption object. MFC after: 1 week Reviewed by: Jose Luis Duran <jlduran@gmail.com> Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47151 --- sbin/ping/tests/test_ping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py index 3c66e6c54c4d..8ec0f3dc74dc 100644 --- a/sbin/ping/tests/test_ping.py +++ b/sbin/ping/tests/test_ping.py @@ -113,7 +113,7 @@ def generate_ip_options(opts): options = sc.IPOption_SSRR(length=3, routers=routers_zero) elif opts == "unk": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) - options = sc.IPOption(b"\x9f") + options = b"\x9f" elif opts == "unk-40": ToolsHelper.set_sysctl("net.inet.ip.process_options", 0) options = sc.IPOption(b"\x9f" * 40)