]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: add tests for IPv6ProxyNDPAddress=
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 26 Jan 2021 12:36:25 +0000 (21:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 26 Jan 2021 16:28:28 +0000 (01:28 +0900)
test/test-network/conf/25-ipv6-proxy-ndp.network [new file with mode: 0644]
test/test-network/systemd-networkd-tests.py

diff --git a/test/test-network/conf/25-ipv6-proxy-ndp.network b/test/test-network/conf/25-ipv6-proxy-ndp.network
new file mode 100644 (file)
index 0000000..acdcce8
--- /dev/null
@@ -0,0 +1,24 @@
+[Match]
+Name=dummy98
+
+[Network]
+IPv6ProxyNDPAddress=2607:5300:203:5215:5::1
+IPv6ProxyNDPAddress=2607:5300:203:5215:4::1
+IPv6ProxyNDPAddress=2607:5300:203:5215:3::1
+IPv6ProxyNDPAddress=2607:5300:203:5215:2::1
+IPv6ProxyNDPAddress=2607:5300:203:5215:1::1
+IPv6AcceptRA=no
+IPForward=yes
+Address=66.70.129.136/32
+Address=66.70.129.142/32
+Address=66.70.129.143/32
+
+[Address]
+Address=2607:5300:203:5215::1/64
+
+[Route]
+Destination=2607:5300:203:52ff:ff:ff:ff:ff
+
+[Route]
+Gateway=2607:5300:203:52ff:ff:ff:ff:ff
+Destination=::/0
index ecd3eaf8f9b573a743f4f8387c3d98f5f84f7cf9..251d2cc7dac9cb55c76882f3a1f589747308bb18 100755 (executable)
@@ -1764,6 +1764,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         '25-gre-tunnel-remote-any.netdev',
         '25-ip6gre-tunnel-remote-any.netdev',
         '25-ipv6-address-label-section.network',
+        '25-ipv6-proxy-ndp.network',
         '25-link-local-addressing-no.network',
         '25-link-local-addressing-yes.network',
         '25-link-section-unmanaged.network',
@@ -2489,6 +2490,17 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         print(output)
         self.assertRegex(output, '2004:da8:1::/64')
 
+    def test_ipv6_proxy_ndp(self):
+        copy_unit_to_networkd_unit_path('25-ipv6-proxy-ndp.network', '12-dummy.netdev')
+        start_networkd()
+
+        self.wait_online(['dummy98:routable'])
+
+        output = check_output('ip neighbor show proxy dev dummy98')
+        print(output)
+        for i in range(1,5):
+            self.assertRegex(output, f'2607:5300:203:5215:{i}::1 *proxy')
+
     def test_neighbor_section(self):
         copy_unit_to_networkd_unit_path('25-neighbor-section.network', '12-dummy.netdev')
         start_networkd()