From: Yu Watanabe Date: Wed, 10 Jul 2019 18:26:30 +0000 (+0900) Subject: test-network: add testcase that Neighbor.LinkLayerAddress= is IP address X-Git-Tag: v243-rc1~148^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13017%2Fhead;p=thirdparty%2Fsystemd.git test-network: add testcase that Neighbor.LinkLayerAddress= is IP address --- diff --git a/test/test-network/conf/25-neighbor-ip-dummy.network b/test/test-network/conf/25-neighbor-ip-dummy.network new file mode 100644 index 00000000000..d99d97298a3 --- /dev/null +++ b/test/test-network/conf/25-neighbor-ip-dummy.network @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Network] +IPv6AcceptRA=no +Tunnel=gretun97 diff --git a/test/test-network/conf/25-neighbor-ip.network b/test/test-network/conf/25-neighbor-ip.network new file mode 100644 index 00000000000..8865ccd9724 --- /dev/null +++ b/test/test-network/conf/25-neighbor-ip.network @@ -0,0 +1,10 @@ +[Match] +Name=gretun97 + +[Network] +IPv6AcceptRA=no +Address=10.0.0.21 + +[Neighbor] +Address=10.0.0.22 +LinkLayerAddress=10.65.223.239 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index f8bae1d2fca..272d5453fe7 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -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', @@ -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')