diff options
author | Kevin P. Fleming <kevin@km6g.us> | 2020-02-08 20:27:06 -0500 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-02-10 00:41:34 +0900 |
commit | b241fa00e92ea086a9d99840f9f5cbb98485680e (patch) | |
tree | 879095f1414d23b05830174f845a3e95bcda05de | |
parent | b751c3e747a90915964b332b1bf64a471a6a9659 (diff) | |
download | systemd-b241fa00e92ea086a9d99840f9f5cbb98485680e.tar.gz |
network: Add test for explicit 'static' IPv6Token
Add a test case for an explicitly-specified 'static' IPv6Token.
Signed-off-by: Kevin P. Fleming <kevin@km6g.us>
-rw-r--r-- | test/test-network/conf/ipv6-prefix-veth-token-static-explicit.network | 6 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 10 |
2 files changed, 16 insertions, 0 deletions
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 0000000000..237f9aa662 --- /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 027570027d..0210c7bfae 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() |