aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_punt.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_punt.py')
-rw-r--r--test/test_punt.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_punt.py b/test/test_punt.py
index 7959b981837..e265dc01f9b 100644
--- a/test/test_punt.py
+++ b/test/test_punt.py
@@ -11,6 +11,7 @@ import struct
from struct import unpack, unpack_from
from util import ppp, ppc
from re import compile
+import scapy.compat
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP, ICMP
@@ -20,12 +21,12 @@ from framework import VppTestCase, VppTestRunner
# Format MAC Address
def get_mac_addr(bytes_addr):
- return ':'.join('%02x' % ord(b) for b in bytes_addr)
+ return ':'.join('%02x' % scapy.compat.orb(b) for b in bytes_addr)
# Format IP Address
def ipv4(bytes_addr):
- return '.'.join('%d' % ord(b) for b in bytes_addr)
+ return '.'.join('%d' % scapy.compat.orb(b) for b in bytes_addr)
# Unpack Ethernet Frame