1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

test-network: add one more testcase for DHCPv4 classless route

For issue #28280.

(cherry picked from commit 86f6760038)
This commit is contained in:
Yu Watanabe 2023-07-07 06:57:04 +09:00 committed by Luca Boccassi
parent 234b51fb73
commit f74337b756

View File

@ -4806,7 +4806,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
]
if classless:
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'
'--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'
]
start_dnsmasq(*additional_options)
self.wait_online(['veth99:routable', 'veth-peer:routable'])
@ -4819,6 +4819,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
if classless:
self.assertRegex(output, r'default via 192.168.5.4 proto dhcp src 192.168.5.[0-9]* metric 1024')
self.assertRegex(output, r'8.0.0.0/8 via 192.168.5.5 proto dhcp src 192.168.5.[0-9]* metric 1024')
self.assertRegex(output, r'192.168.5.64/26 via 192.168.5.5 proto dhcp src 192.168.5.[0-9]* metric 1024')
self.assertRegex(output, r'192.168.5.4 proto dhcp scope link src 192.168.5.[0-9]* metric 1024')
self.assertRegex(output, r'192.168.5.5 proto dhcp scope link src 192.168.5.[0-9]* metric 1024')
else: