From: Yu Watanabe Date: Fri, 20 Aug 2021 18:54:35 +0000 (+0900) Subject: test-network: add testcases that gateway address is IPv6 link local X-Git-Tag: v250-rc1~784^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F20498%2Fhead;p=thirdparty%2Fsystemd.git test-network: add testcases that gateway address is IPv6 link local --- diff --git a/test/test-network/conf/25-nexthop.network b/test/test-network/conf/25-nexthop.network index 6f54e3f0d50..3e87bd40a93 100644 --- a/test/test-network/conf/25-nexthop.network +++ b/test/test-network/conf/25-nexthop.network @@ -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 diff --git a/test/test-network/conf/25-route-static.network b/test/test-network/conf/25-route-static.network index 09aae8067ad..94b2e8730fd 100644 --- a/test/test-network/conf/25-route-static.network +++ b/test/test-network/conf/25-route-static.network @@ -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 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 83878614231..e5610bf1b28 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')