summaryrefslogtreecommitdiffstats
path: root/test/test_dhcp.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-03-10 10:04:23 -0700
committerOle Trøan <otroan@employees.org>2019-03-11 08:11:16 +0000
commita7427ec6f86cbeba7594f98e41fecab291d66b73 (patch)
treea1fe195ee4ccdecd420cd908c0752a33ebf3aa19 /test/test_dhcp.py
parent0f6602cb246894ea98253e16aae198094bf78694 (diff)
VPP-1508: Use scapy.compat to manage packet level library differences.
Change-Id: Icdf6abc9e53d33b26fd1d531c7dda6be0bb9cb55 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_dhcp.py')
-rw-r--r--test/test_dhcp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_dhcp.py b/test/test_dhcp.py
index 2efa9a7e244..62db66282b6 100644
--- a/test/test_dhcp.py
+++ b/test/test_dhcp.py
@@ -8,6 +8,7 @@ from framework import VppTestCase, VppTestRunner, running_extended_tests
from vpp_neighbor import VppNeighbor
from vpp_ip_route import find_route, VppIpTable
from util import mk_ll_addr
+import scapy.compat
from scapy.layers.l2 import Ether, getmacbyip, ARP
from scapy.layers.inet import IP, UDP, ICMP
from scapy.layers.inet6 import IPv6, in6_getnsmac
@@ -490,7 +491,7 @@ class TestDHCP(VppTestCase):
#
# 1. not our IP address = not checked by VPP? so offer is replayed
# to client
- bad_ip = option_82[0:8] + chr(33) + option_82[9:]
+ bad_ip = option_82[0:8] + scapy.compat.chb(33) + option_82[9:]
p = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4) /
@@ -504,7 +505,7 @@ class TestDHCP(VppTestCase):
"DHCP offer option 82 bad address")
# 2. Not a sw_if_index VPP knows
- bad_if_index = option_82[0:2] + chr(33) + option_82[3:]
+ bad_if_index = option_82[0:2] + scapy.compat.chb(33) + option_82[3:]
p = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4) /