diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-08-21 03:54:35 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-08-22 15:35:22 +0900 |
commit | 180c5116b3ce09c2bac4f40bc976dc0a7023fee0 (patch) | |
tree | a23b55936fadbfaf47ce8d229b0def1be67558c1 | |
parent | 3333350a0e1917395d3654731ca985ea668bca9b (diff) | |
download | systemd-180c5116b3ce09c2bac4f40bc976dc0a7023fee0.tar.gz |
test-network: add testcases that gateway address is IPv6 link local
-rw-r--r-- | test/test-network/conf/25-nexthop.network | 4 | ||||
-rw-r--r-- | test/test-network/conf/25-route-static.network | 4 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/test/test-network/conf/25-nexthop.network b/test/test-network/conf/25-nexthop.network index 6f54e3f0d5..3e87bd40a9 100644 --- a/test/test-network/conf/25-nexthop.network +++ b/test/test-network/conf/25-nexthop.network @@ -39,6 +39,10 @@ Family=ipv6 Blackhole=yes [NextHop] +Id=8 +Gateway=fe80::222:4dff:ff:ff:ff:ff + +[NextHop] Gateway=192.168.5.2 [NextHop] diff --git a/test/test-network/conf/25-route-static.network b/test/test-network/conf/25-route-static.network index 09aae8067a..94b2e8730f 100644 --- a/test/test-network/conf/25-route-static.network +++ b/test/test-network/conf/25-route-static.network @@ -18,6 +18,10 @@ Destination=2001:1234:5:9fff:ff:ff:ff:ff/128 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 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 8387861423..e5610bf1b2 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -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') |