git: d261971e7d58 - stable/14 - ping tests: fix for scapy-2.6.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Oct 2024 12:52:46 UTC
The branch stable/14 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=d261971e7d58dcdd28bb18fd768ff028d90a6b9a
commit d261971e7d58dcdd28bb18fd768ff028d90a6b9a
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-10-16 07:57:06 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-10-21 12:51:36 +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
(cherry picked from commit 2926c2594249f64fecbbdcb0b0b9a3591931ab04)
---
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)