Skip to content

Commit 29a8835

Browse files
yuwatabluca
authored andcommitted
test-network: add one more testcase for DHCPv4 classless route
For issue #28280. (cherry picked from commit 86f6760) (cherry picked from commit f74337b) (cherry picked from commit 7cf1bc0)
1 parent 73803c7 commit 29a8835

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test-network/systemd-networkd-tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4557,7 +4557,7 @@ def _test_dhcp_client_ipv4_use_routes_gateway(self, use_routes, use_gateway, dns
45574557
self.wait_online(['veth-peer:carrier'])
45584558
additional_options = '--dhcp-option=option:dns-server,192.168.5.10,8.8.8.8 --dhcp-option=option:ntp-server,192.168.5.11,9.9.9.9 --dhcp-option=option:static-route,192.168.5.100,192.168.5.2,8.8.8.8,192.168.5.3'
45594559
if classless:
4560-
additional_options += ' --dhcp-option=option:classless-static-route,0.0.0.0/0,192.168.5.4,8.0.0.0/8,192.168.5.5'
4560+
additional_options += ' --dhcp-option=option:classless-static-route,0.0.0.0/0,192.168.5.4,8.0.0.0/8,192.168.5.5,192.168.5.64/26,192.168.5.5'
45614561
start_dnsmasq(additional_options=additional_options, lease_time='2m')
45624562
self.wait_online(['veth99:routable', 'veth-peer:routable'])
45634563

@@ -4569,6 +4569,7 @@ def _test_dhcp_client_ipv4_use_routes_gateway(self, use_routes, use_gateway, dns
45694569
if classless:
45704570
self.assertRegex(output, r'default via 192.168.5.4 proto dhcp src 192.168.5.[0-9]* metric 1024')
45714571
self.assertRegex(output, r'8.0.0.0/8 via 192.168.5.5 proto dhcp src 192.168.5.[0-9]* metric 1024')
4572+
self.assertRegex(output, r'192.168.5.64/26 via 192.168.5.5 proto dhcp src 192.168.5.[0-9]* metric 1024')
45724573
self.assertRegex(output, r'192.168.5.4 proto dhcp scope link src 192.168.5.[0-9]* metric 1024')
45734574
self.assertRegex(output, r'192.168.5.5 proto dhcp scope link src 192.168.5.[0-9]* metric 1024')
45744575
else:

0 commit comments

Comments
 (0)