summaryrefslogtreecommitdiffstats
path: root/test/test_ip4.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_ip4.py')
-rw-r--r--test/test_ip4.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_ip4.py b/test/test_ip4.py
index 60bc023a280..af0c319d4a1 100644
--- a/test/test_ip4.py
+++ b/test/test_ip4.py
@@ -100,7 +100,7 @@ class TestIPv4(VppTestCase):
:param int packet_size: Required packet size.
:param Scapy pkt: Packet to be modified.
"""
- dst_if_idx = packet_size / 10 % 2
+ dst_if_idx = int(packet_size / 10 % 2)
dst_if = self.flows[src_if][dst_if_idx]
info = self.create_packet_info(src_if, dst_if)
payload = self.info_to_payload(info)
@@ -377,7 +377,7 @@ class TestICMPEcho(VppTestCase):
icmp_id = 0xb
icmp_seq = 5
- icmp_load = '\x0a' * 18
+ icmp_load = b'\x0a' * 18
p_echo_request = (Ether(src=self.pg0.remote_mac,
dst=self.pg0.local_mac) /
IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4) /
@@ -1938,7 +1938,7 @@ class TestIPv4Frag(VppTestCase):
packets = self.dst_if.get_capture(3)
# Assume VPP sends the fragments in order
- payload = ''
+ payload = b''
for p in packets:
payload_offset = p.frag * 8
if payload_offset > 0: