Merge pull request #14415 from ssahani/prefixstable-rfc-7217-new

network: Allow to specify multiple IPv6Token for SLAAC
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-02-05 17:05:33 +01:00
committed by GitHub
9 changed files with 295 additions and 27 deletions
@@ -0,0 +1,6 @@
[Match]
Name=veth99
[Network]
IPv6AcceptRA=true
IPv6Token=::1a:2b:3c:4d
@@ -0,0 +1,6 @@
[Match]
Name=veth99
[Network]
IPv6AcceptRA=true
IPv6Token=prefixstable:2002:da8:1::
+21 -1
View File
@@ -2644,7 +2644,9 @@ class NetworkdRATests(unittest.TestCase, Utilities):
units = [
'25-veth.netdev',
'ipv6-prefix.network',
'ipv6-prefix-veth.network']
'ipv6-prefix-veth.network',
'ipv6-prefix-veth-token-eui64.network',
'ipv6-prefix-veth-token-prefixstable.network']
def setUp(self):
remove_links(self.links)
@@ -2669,6 +2671,24 @@ class NetworkdRATests(unittest.TestCase, Utilities):
print(output)
self.assertRegex(output, '2002:da8:1:0')
def test_ipv6_token_eui64(self):
copy_unit_to_networkd_unit_path('25-veth.netdev', 'ipv6-prefix.network', 'ipv6-prefix-veth-token-eui64.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()
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')
class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
links = ['veth99']