summaryrefslogtreecommitdiffstats
path: root/test/test_linux_cp.py
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2024-07-23 01:28:19 -0400
committerBeno�t Ganne <bganne@cisco.com>2024-08-07 09:15:17 +0000
commitcf9356d642ce131c6562fcd281c01e51af888ec3 (patch)
tree8a57da79b102ee9a6c4fa3d8c834591ddfdbaff0 /test/test_linux_cp.py
parent0a3b0b231d8d2978c3322cc5ba8e1d2746a6d730 (diff)
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>
Diffstat (limited to 'test/test_linux_cp.py')
-rw-r--r--test/test_linux_cp.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_linux_cp.py b/test/test_linux_cp.py
index 84d5cb6cd88..ff6023cea26 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 @@ class TestLinuxCP(VppTestCase):
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 @@ class TestLinuxCP(VppTestCase):
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 @@ class TestLinuxCP(VppTestCase):
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 @@ class TestLinuxCP(VppTestCase):
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 @@ class TestLinuxCPIpsec(TemplateIpsec, TemplateIpsecItf4, IpsecTun4):
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)