From: Kevin P. Fleming Date: Sun, 9 Feb 2020 01:27:06 +0000 (-0500) Subject: network: Add test for explicit 'static' IPv6Token X-Git-Tag: v245-rc2~67^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b241fa00e92ea086a9d99840f9f5cbb98485680e;p=thirdparty%2Fsystemd.git network: Add test for explicit 'static' IPv6Token Add a test case for an explicitly-specified 'static' IPv6Token. Signed-off-by: Kevin P. Fleming --- diff --git a/test/test-network/conf/ipv6-prefix-veth-token-static-explicit.network b/test/test-network/conf/ipv6-prefix-veth-token-static-explicit.network new file mode 100644 index 00000000000..237f9aa6623 --- /dev/null +++ b/test/test-network/conf/ipv6-prefix-veth-token-static-explicit.network @@ -0,0 +1,6 @@ +[Match] +Name=veth99 + +[Network] +IPv6AcceptRA=true +IPv6Token=static:::1a:2b:3c:4d diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 027570027de..0210c7bfaea 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -2681,6 +2681,7 @@ class NetworkdRATests(unittest.TestCase, Utilities): 'ipv6-prefix.network', 'ipv6-prefix-veth.network', 'ipv6-prefix-veth-token-static.network', + 'ipv6-prefix-veth-token-static-explicit.network', 'ipv6-prefix-veth-token-prefixstable.network'] def setUp(self): @@ -2715,6 +2716,15 @@ class NetworkdRATests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, '2002:da8:1:0:1a:2b:3c:4d') + def test_ipv6_token_static_explicit(self): + copy_unit_to_networkd_unit_path('25-veth.netdev', 'ipv6-prefix.network', 'ipv6-prefix-veth-token-static-explicit.network') + start_networkd() + self.wait_online(['veth99:routable', 'veth-peer:degraded']) + + output = check_output(*networkctl_cmd, '-n', '0', 'status', 'veth99', env=env) + print(output) + self.assertRegex(output, '2002:da8:1:0:1a:2b:3c:4d') + def test_ipv6_token_prefixstable(self): copy_unit_to_networkd_unit_path('25-veth.netdev', 'ipv6-prefix.network', 'ipv6-prefix-veth-token-prefixstable.network') start_networkd()