tests: update scapy to version 2.4.5
- Required for Ubuntu 24.04 LTS jobs
- temporarily disable TestIpsecEsp1 and
TestIpsecAhAll tests until a patch can
be added to fix them
Type: test
Change-Id: I1ae7b170117182c3252629bbbb770775e2c496c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
diff --git a/test/test_linux_cp.py b/test/test_linux_cp.py
index 84d5cb6..ff6023c 100644
--- a/test/test_linux_cp.py
+++ b/test/test_linux_cp.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import unittest
+import socket
from scapy.layers.inet import IP, UDP
from scapy.layers.inet6 import IPv6, Raw
@@ -241,7 +242,7 @@
self.assertEqual(rx[Ether].dst, phy.remote_mac)
self.assertEqual(rx[IP].dst, phy.remote_ip4)
self.assertEqual(rx[IP].src, phy.local_ip4)
- inner = IP(rx[IP].payload)
+ inner = IP(bytes(rx[IP].payload))
self.assertEqual(inner.src, tun4.local_ip4)
self.assertEqual(inner.dst, "2.2.2.2")
@@ -254,7 +255,7 @@
for rx in rxs:
self.assertEqual(rx[IPv6].dst, phy.remote_ip6)
self.assertEqual(rx[IPv6].src, phy.local_ip6)
- inner = IPv6(rx[IPv6].payload)
+ inner = IPv6(bytes(rx[IPv6].payload))
self.assertEqual(inner.src, tun6.local_ip6)
self.assertEqual(inner.dst, "2::2")
@@ -269,7 +270,7 @@
rxs = self.send_and_expect(phy, p * N_PKTS, self.pg4)
for rx in rxs:
- rx = IP(rx)
+ rx = IP(bytes(rx))
self.assertEqual(rx[IP].dst, tun4.local_ip4)
self.assertEqual(rx[IP].src, tun4.remote_ip4)
@@ -284,7 +285,7 @@
rxs = self.send_and_expect(phy, p * N_PKTS, self.pg5)
for rx in rxs:
- rx = IPv6(rx)
+ rx = IPv6(bytes(rx))
self.assertEqual(rx[IPv6].dst, tun6.local_ip6)
self.assertEqual(rx[IPv6].src, tun6.remote_ip6)
@@ -353,7 +354,7 @@
def verify_decrypted(self, p, rxs):
for rx in rxs:
- rx = IP(rx)
+ rx = IP(bytes(rx))
self.assert_equal(rx[IP].src, p.tun_if.remote_ip4)
self.assert_equal(rx[IP].dst, p.tun_if.local_ip4)
self.assert_packet_checksums_valid(rx)