aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_dhcp.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-03-23 11:53:12 -0700
committerNeale Ranns <nranns@cisco.com>2018-03-23 11:53:24 -0700
commit1f2f4b70556ea2ee626f9558ea55e31d29017d42 (patch)
tree8ebea48fa5978dea93e1b0a6261651afb50db9b8 /test/test_dhcp.py
parent563a8531cbc3e7c222e3e4841637b94b65637caa (diff)
Add client hw address to DHCP offer and ack in test case
Change-Id: Ifc9bb4ea39b504372a6a39bbf56c29761d0c6111 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_dhcp.py')
-rw-r--r--test/test_dhcp.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/test_dhcp.py b/test/test_dhcp.py
index b3bd3a1d3cd..c5b1fa5fe3b 100644
--- a/test/test_dhcp.py
+++ b/test/test_dhcp.py
@@ -1195,7 +1195,6 @@ class TestDHCP(VppTestCase):
self.pg4.unconfig_ip6()
self.pg5.unconfig_ip6()
- @unittest.skipUnless(running_extended_tests(), "part of extended tests")
def test_dhcp_client(self):
""" DHCP Client"""
@@ -1218,7 +1217,9 @@ class TestDHCP(VppTestCase):
p_offer = (Ether(dst=self.pg3.local_mac, src=self.pg3.remote_mac) /
IP(src=self.pg3.remote_ip4, dst="255.255.255.255") /
UDP(sport=DHCP4_SERVER_PORT, dport=DHCP4_CLIENT_PORT) /
- BOOTP(op=1, yiaddr=self.pg3.local_ip4) /
+ BOOTP(op=1,
+ yiaddr=self.pg3.local_ip4,
+ chaddr=mactobinary(self.pg3.local_mac)) /
DHCP(options=[('message-type', 'offer'),
('server_id', self.pg3.remote_ip4),
('end')]))
@@ -1237,7 +1238,8 @@ class TestDHCP(VppTestCase):
p_ack = (Ether(dst=self.pg3.local_mac, src=self.pg3.remote_mac) /
IP(src=self.pg3.remote_ip4, dst="255.255.255.255") /
UDP(sport=DHCP4_SERVER_PORT, dport=DHCP4_CLIENT_PORT) /
- BOOTP(op=1, yiaddr=self.pg3.local_ip4) /
+ BOOTP(op=1, yiaddr=self.pg3.local_ip4,
+ chaddr=mactobinary(self.pg3.local_mac)) /
DHCP(options=[('message-type', 'ack'),
('subnet_mask', "255.255.255.0"),
('router', self.pg3.remote_ip4),
@@ -1308,7 +1310,8 @@ class TestDHCP(VppTestCase):
p_ack = (Ether(dst=self.pg3.local_mac, src=self.pg3.remote_mac) /
IP(src=self.pg3.remote_ip4, dst=self.pg3.local_ip4) /
UDP(sport=DHCP4_SERVER_PORT, dport=DHCP4_CLIENT_PORT) /
- BOOTP(op=1, yiaddr=self.pg3.local_ip4) /
+ BOOTP(op=1, yiaddr=self.pg3.local_ip4,
+ chaddr=mactobinary(self.pg3.local_mac)) /
DHCP(options=[('message-type', 'ack'),
('subnet_mask', "255.255.255.0"),
('router', self.pg3.remote_ip4),
@@ -1365,7 +1368,8 @@ class TestDHCP(VppTestCase):
p_offer = (Ether(dst=self.pg3.local_mac, src=self.pg3.remote_mac) /
IP(src=self.pg3.remote_ip4, dst=self.pg3.local_ip4) /
UDP(sport=DHCP4_SERVER_PORT, dport=DHCP4_CLIENT_PORT) /
- BOOTP(op=1, yiaddr=self.pg3.local_ip4) /
+ BOOTP(op=1, yiaddr=self.pg3.local_ip4,
+ chaddr=mactobinary(self.pg3.local_mac)) /
DHCP(options=[('message-type', 'offer'),
('server_id', self.pg3.remote_ip4),
('end')]))
@@ -1385,7 +1389,8 @@ class TestDHCP(VppTestCase):
p_ack = (Ether(dst=self.pg3.local_mac, src=self.pg3.remote_mac) /
IP(src=self.pg3.remote_ip4, dst=self.pg3.local_ip4) /
UDP(sport=DHCP4_SERVER_PORT, dport=DHCP4_CLIENT_PORT) /
- BOOTP(op=1, yiaddr=self.pg3.local_ip4) /
+ BOOTP(op=1, yiaddr=self.pg3.local_ip4,
+ chaddr=mactobinary(self.pg3.local_mac)) /
DHCP(options=[('message-type', 'ack'),
('subnet_mask', "255.255.255.0"),
('router', self.pg3.remote_ip4),