Skip to content

Commit f74337b

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

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
@@ -4806,7 +4806,7 @@ def _test_dhcp_client_ipv4_use_routes_gateway(self, use_routes, use_gateway, dns
48064806
]
48074807
if classless:
48084808
additional_options += [
4809-
'--dhcp-option=option:classless-static-route,0.0.0.0/0,192.168.5.4,8.0.0.0/8,192.168.5.5'
4809+
'--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'
48104810
]
48114811
start_dnsmasq(*additional_options)
48124812
self.wait_online(['veth99:routable', 'veth-peer:routable'])
@@ -4819,6 +4819,7 @@ def _test_dhcp_client_ipv4_use_routes_gateway(self, use_routes, use_gateway, dns
48194819
if classless:
48204820
self.assertRegex(output, r'default via 192.168.5.4 proto dhcp src 192.168.5.[0-9]* metric 1024')
48214821
self.assertRegex(output, r'8.0.0.0/8 via 192.168.5.5 proto dhcp src 192.168.5.[0-9]* metric 1024')
4822+
self.assertRegex(output, r'192.168.5.64/26 via 192.168.5.5 proto dhcp src 192.168.5.[0-9]* metric 1024')
48224823
self.assertRegex(output, r'192.168.5.4 proto dhcp scope link src 192.168.5.[0-9]* metric 1024')
48234824
self.assertRegex(output, r'192.168.5.5 proto dhcp scope link src 192.168.5.[0-9]* metric 1024')
48244825
else:

0 commit comments

Comments
 (0)