Merge pull request #14833 from kpfleming/multiple-ipv6token-addresses

Support multiple IPv6Token 'static' addreses on an interface
This commit is contained in:
Yu Watanabe
2020-02-12 02:10:44 +09:00
committed by GitHub
6 changed files with 150 additions and 63 deletions
@@ -0,0 +1,7 @@
[Match]
Name=veth99
[Network]
IPv6AcceptRA=true
IPv6Token=::1a:2b:3c:4d
IPv6Token=::fa:de:ca:fe
@@ -2685,6 +2685,7 @@ class NetworkdRATests(unittest.TestCase, Utilities):
'ipv6-prefix-veth.network',
'ipv6-prefix-veth-token-static.network',
'ipv6-prefix-veth-token-static-explicit.network',
'ipv6-prefix-veth-token-static-multiple.network',
'ipv6-prefix-veth-token-prefixstable.network']
def setUp(self):
@@ -2728,6 +2729,16 @@ class NetworkdRATests(unittest.TestCase, Utilities):
print(output)
self.assertRegex(output, '2002:da8:1:0:1a:2b:3c:4d')
def test_ipv6_token_static_multiple(self):
copy_unit_to_networkd_unit_path('25-veth.netdev', 'ipv6-prefix.network', 'ipv6-prefix-veth-token-static-multiple.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')
self.assertRegex(output, '2002:da8:1:0:fa:de:ca:fe')
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()