mirror of
https://github.com/systemd/systemd.git
synced 2025-03-08 08:58:27 +03:00
test-network: add test for issue #17304
This commit is contained in:
parent
b1476b5210
commit
21266e60e9
9
test/test-network/conf/25-address-peer-ipv4.network
Normal file
9
test/test-network/conf/25-address-peer-ipv4.network
Normal file
@ -0,0 +1,9 @@
|
||||
[Match]
|
||||
Name=dummy98
|
||||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
|
||||
[Address]
|
||||
Address=100.64.0.1/32
|
||||
Peer=100.64.0.2/32
|
@ -1742,6 +1742,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
'25-address-dad-veth-peer.network',
|
||||
'25-address-dad-veth99.network',
|
||||
'25-address-link-section.network',
|
||||
'25-address-peer-ipv4.network',
|
||||
'25-address-preferred-lifetime-zero.network',
|
||||
'25-address-static.network',
|
||||
'25-bind-carrier.network',
|
||||
@ -1886,6 +1887,21 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
|
||||
print(output)
|
||||
self.assertNotRegex(output, '192.168.100.10/24')
|
||||
|
||||
def test_address_peer_ipv4(self):
|
||||
# test for issue #17304
|
||||
copy_unit_to_networkd_unit_path('25-address-peer-ipv4.network', '12-dummy.netdev')
|
||||
|
||||
for trial in range(2):
|
||||
if trial == 0:
|
||||
start_networkd()
|
||||
else:
|
||||
restart_networkd()
|
||||
|
||||
self.wait_online(['dummy98:routable'])
|
||||
|
||||
output = check_output('ip -4 address show dev dummy98')
|
||||
self.assertIn('inet 100.64.0.1 peer 100.64.0.2/32 scope global', output)
|
||||
|
||||
@expectedFailureIfModuleIsNotAvailable('vrf')
|
||||
def test_prefix_route(self):
|
||||
copy_unit_to_networkd_unit_path('25-prefix-route-with-vrf.network', '12-dummy.netdev',
|
||||
|
Loading…
x
Reference in New Issue
Block a user