From fb2ba3305bf46236ef84781fd15d791f50ea32b7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 18 Jul 2019 13:09:42 +0900 Subject: test-network: add test for neighbor with ipv6 lladdr --- test/test-network/conf/25-neighbor-ip-dummy.network | 1 + test/test-network/conf/25-neighbor-ipv6.network | 11 +++++++++++ test/test-network/systemd-networkd-tests.py | 13 ++++++++++--- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 test/test-network/conf/25-neighbor-ipv6.network (limited to 'test') diff --git a/test/test-network/conf/25-neighbor-ip-dummy.network b/test/test-network/conf/25-neighbor-ip-dummy.network index d99d97298a..e02c55e3a0 100644 --- a/test/test-network/conf/25-neighbor-ip-dummy.network +++ b/test/test-network/conf/25-neighbor-ip-dummy.network @@ -4,3 +4,4 @@ Name=dummy98 [Network] IPv6AcceptRA=no Tunnel=gretun97 +Tunnel=ip6gretun97 diff --git a/test/test-network/conf/25-neighbor-ipv6.network b/test/test-network/conf/25-neighbor-ipv6.network new file mode 100644 index 0000000000..322f73965d --- /dev/null +++ b/test/test-network/conf/25-neighbor-ipv6.network @@ -0,0 +1,11 @@ +[Match] +Name=ip6gretun97 + +[Network] +IPv6AcceptRA=no +Address=2001:db8:0:f102::16/64 +LinkLocalAddressing=no + +[Neighbor] +Address=2001:db8:0:f102::17 +LinkLayerAddress=2a00:ffde:4567:edde::4988 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 9ef9b023e9..2f13bc2bbb 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1388,6 +1388,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): 'dummy98', 'dummy99', 'gretun97', + 'ip6gretun97', 'test1' ] @@ -1405,8 +1406,10 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): '25-fibrule-invert.network', '25-fibrule-port-range.network', '25-gre-tunnel-remote-any.netdev', + '25-ip6gre-tunnel-remote-any.netdev', '25-ipv6-address-label-section.network', '25-neighbor-section.network', + '25-neighbor-ipv6.network', '25-neighbor-ip-dummy.network', '25-neighbor-ip.network', '25-link-local-addressing-no.network', @@ -1667,15 +1670,19 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities): 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') + copy_unit_to_networkd_unit_path('25-neighbor-ip.network', '25-neighbor-ipv6.network', '25-neighbor-ip-dummy.network', + '12-dummy.netdev', '25-gre-tunnel-remote-any.netdev', '25-ip6gre-tunnel-remote-any.netdev') start_networkd() - self.wait_online(['dummy98:degraded', 'gretun97:routable'], timeout='40s') + self.wait_online(['dummy98:degraded', 'gretun97:routable', 'ip6gretun97: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') + output = check_output('ip neigh list dev ip6gretun97') + print(output) + self.assertRegex(output, '2001:db8:0:f102::17 lladdr 2a:?00:ff:?de:45:?67:ed:?de:[0:]*:49:?88 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') -- cgit v1.2.1