]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/test-network/systemd-networkd-tests.py
Merge pull request #12971 from yuwata/network-reassign-static-routes
[thirdparty/systemd.git] / test / test-network / systemd-networkd-tests.py
index e0357ddeb7634543a767da8bcff3c710432d67dd..399824af5c4f17603be98684c85451acbd00921f 100755 (executable)
@@ -1376,7 +1376,9 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         'bond199',
         'dummy98',
         'dummy99',
-        'test1']
+        'gretun97',
+        'test1'
+    ]
 
     units = [
         '11-dummy.netdev',
@@ -1391,8 +1393,11 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         '25-bond-active-backup-slave.netdev',
         '25-fibrule-invert.network',
         '25-fibrule-port-range.network',
+        '25-gre-tunnel-remote-any.netdev',
         '25-ipv6-address-label-section.network',
         '25-neighbor-section.network',
+        '25-neighbor-ip-dummy.network',
+        '25-neighbor-ip.network',
         '25-link-local-addressing-no.network',
         '25-link-local-addressing-yes.network',
         '25-link-section-unmanaged.network',
@@ -1620,7 +1625,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         print(output)
         self.assertRegex(output, '2004:da8:1::/64')
 
-    def test_ipv6_neighbor(self):
+    def test_neighbor_section(self):
         copy_unit_to_networkd_unit_path('25-neighbor-section.network', '12-dummy.netdev')
         start_networkd()
         wait_online(['dummy98:degraded'], timeout='40s')
@@ -1630,6 +1635,16 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         self.assertRegex(output, '192.168.10.1.*00:00:5e:00:02:65.*PERMANENT')
         self.assertRegex(output, '2004:da8:1::1.*00:00:5e:00:02:66.*PERMANENT')
 
+    def test_neighbor_gre(self):
+        copy_unit_to_networkd_unit_path('25-neighbor-ip.network', '25-neighbor-ip-dummy.network',
+                                        '12-dummy.netdev', '25-gre-tunnel-remote-any.netdev')
+        start_networkd()
+        wait_online(['dummy98:degraded', 'gretun97:routable'], timeout='40s')
+
+        output = check_output('ip neigh list dev gretun97')
+        print(output)
+        self.assertRegex(output, '10.0.0.22 lladdr 10.65.223.239 PERMANENT')
+
     def test_link_local_addressing(self):
         copy_unit_to_networkd_unit_path('25-link-local-addressing-yes.network', '11-dummy.netdev',
                                         '25-link-local-addressing-no.network', '12-dummy.netdev')