1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

test-network: add testcases that gateway address is IPv6 link local

This commit is contained in:
Yu Watanabe 2021-08-21 03:54:35 +09:00
parent 3333350a0e
commit 180c5116b3
3 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,10 @@ Id=7
Family=ipv6
Blackhole=yes
[NextHop]
Id=8
Gateway=fe80::222:4dff:ff:ff:ff:ff
[NextHop]
Gateway=192.168.5.2

View File

@ -17,6 +17,10 @@ Destination=2001:1234:5:9fff:ff:ff:ff:ff/128
[Route]
Gateway=2001:1234:5:8fff:ff:ff:ff:ff
[Route]
Destination=2001:1234:5:afff:ff:ff:ff:ff/128
Gateway=fe80::222:4dff:ff:ff:ff:ff
[Route]
Destination=149.10.124.64
Scope=link

View File

@ -2337,6 +2337,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
print(output)
self.assertIn('2001:1234:5:8fff:ff:ff:ff:ff proto static', output)
self.assertIn('2001:1234:5:8f63::1 proto kernel', output)
self.assertIn('2001:1234:5:afff:ff:ff:ff:ff via fe80:0:222:4dff:ff:ff:ff:ff proto static', output)
print('### ip -6 route show default')
output = check_output('ip -6 route show default')
@ -2985,6 +2986,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
self.assertIn('id 3 dev veth99', output)
self.assertIn('id 4 dev veth99', output)
self.assertRegex(output, 'id 5 via 192.168.10.1 dev veth99 .*onlink')
self.assertIn('id 8 via fe80:0:222:4dff:ff:ff:ff:ff dev veth99', output)
self.assertRegex(output, r'id [0-9]* via 192.168.5.2 dev veth99')
output = check_output('ip nexthop list dev dummy98')