]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: add testcases that gateway address is IPv6 link local 20498/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 20 Aug 2021 18:54:35 +0000 (03:54 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 22 Aug 2021 06:35:22 +0000 (15:35 +0900)
test/test-network/conf/25-nexthop.network
test/test-network/conf/25-route-static.network
test/test-network/systemd-networkd-tests.py

index 6f54e3f0d5027c78739017187b7a0d94e538189a..3e87bd40a93d25678259348867de17ed55de1e98 100644 (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
 
index 09aae8067ad9f7ee7047a0e0deda7269b21e06b9..94b2e8730fd973842cebe8fe487bfb2da6d5c26c 100644 (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
index 83878614231622ee08c8ad9fcd268238befc9cde..e5610bf1b2819067a4945fa520f5f26061d96355 100755 (executable)
@@ -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')