diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-18 13:09:42 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-07-19 07:14:58 +0900 |
commit | fb2ba3305bf46236ef84781fd15d791f50ea32b7 (patch) | |
tree | 9d75597fec6217a4b48d636dc44e17f289782528 /test | |
parent | 1647f24100d63cf44c440aee9623ddc1764b9e1f (diff) | |
download | systemd-fb2ba3305bf46236ef84781fd15d791f50ea32b7.tar.gz |
test-network: add test for neighbor with ipv6 lladdr
Diffstat (limited to 'test')
-rw-r--r-- | test/test-network/conf/25-neighbor-ip-dummy.network | 1 | ||||
-rw-r--r-- | test/test-network/conf/25-neighbor-ipv6.network | 11 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 13 |
3 files changed, 22 insertions, 3 deletions
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') |