mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-21 18:03:41 +03:00
test-network: add one more testcase for DHCPv4 classless route
For issue #28280. (cherry picked from commit 86f6760038477e9e27ccea580f1b3b27328a98a7) (cherry picked from commit f74337b7565348a9bd44baae27917b2a202dcf1a) (cherry picked from commit 7cf1bc00b02010f7ad89c5804dfa81fd906e44c7)
This commit is contained in:
parent
73803c71b9
commit
29a8835ea2
@ -4557,7 +4557,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
|||||||
self.wait_online(['veth-peer:carrier'])
|
self.wait_online(['veth-peer:carrier'])
|
||||||
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'
|
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'
|
||||||
if classless:
|
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'
|
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'
|
||||||
start_dnsmasq(additional_options=additional_options, lease_time='2m')
|
start_dnsmasq(additional_options=additional_options, lease_time='2m')
|
||||||
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
||||||
|
|
||||||
@ -4569,6 +4569,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
|||||||
if classless:
|
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'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'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.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')
|
self.assertRegex(output, r'192.168.5.5 proto dhcp scope link src 192.168.5.[0-9]* metric 1024')
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user