mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
test-network: add one more test case for DHCP prefix delegation
For issue #31349.
This commit is contained in:
parent
ab06b74fd3
commit
3b677c6f94
20
test/test-network/conf/25-dhcp6pd-upstream-no-assign.network
Normal file
20
test/test-network/conf/25-dhcp6pd-upstream-no-assign.network
Normal file
|
@ -0,0 +1,20 @@
|
|||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Match]
|
||||
Name=veth99
|
||||
|
||||
[Network]
|
||||
IPv6PrivacyExtensions=yes
|
||||
IPv6AcceptRA=no
|
||||
DHCP=ipv6
|
||||
DHCPPrefixDelegation=yes
|
||||
|
||||
[DHCPv6]
|
||||
WithoutRA=solicit
|
||||
|
||||
[DHCPPrefixDelegation]
|
||||
UplinkInterface=:self
|
||||
SubnetId=10
|
||||
Announce=no
|
||||
Token=eui64
|
||||
Token=::1a:2b:3c:4d
|
||||
Assign=no
|
18
test/test-network/conf/isc-dhcpd-dhcp6pd-no-range.conf
Normal file
18
test/test-network/conf/isc-dhcpd-dhcp6pd-no-range.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
default-lease-time 2592000;
|
||||
preferred-lifetime 604800;
|
||||
|
||||
option dhcp-renewal-time 3600;
|
||||
option dhcp-rebinding-time 7200;
|
||||
|
||||
# Enable RFC 5007 support (same than for DHCPv4)
|
||||
allow leasequery;
|
||||
|
||||
option dhcp6.name-servers 3ffe:501:ffff:100:200:ff:fe00:3f3e;
|
||||
option dhcp6.domain-search "test.example.com","example.com";
|
||||
|
||||
option dhcp6.info-refresh-time 21600;
|
||||
|
||||
subnet6 3ffe:501:ffff:100::/64 {
|
||||
# Some /64 prefixes available for Prefix Delegation (RFC 3633)
|
||||
prefix6 3ffe:501:ffff:200:: 3ffe:501:ffff:f00:: /56;
|
||||
}
|
|
@ -6603,6 +6603,23 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
|
|||
|
||||
self.check_dhcp6_prefix('veth99')
|
||||
|
||||
def test_dhcp6pd_no_assign(self):
|
||||
# Similar to test_dhcp6pd_no_assign(), but in this case UseAddress=yes (default),
|
||||
# However, the server does not provide IA_NA. For issue #31349.
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream-no-assign.network')
|
||||
|
||||
start_networkd()
|
||||
self.wait_online('veth-peer:routable')
|
||||
start_isc_dhcpd(conf_file='isc-dhcpd-dhcp6pd-no-range.conf', ipv='-6')
|
||||
self.wait_online('veth99:degraded')
|
||||
|
||||
print('### ip -6 address show dev veth99 scope global')
|
||||
output = check_output('ip -6 address show dev veth99 scope global')
|
||||
print(output)
|
||||
self.assertNotIn('inet6 3ffe:501:ffff', output)
|
||||
|
||||
self.check_dhcp6_prefix('veth99')
|
||||
|
||||
def test_dhcp6pd(self):
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp6pd-server.network', '25-dhcp6pd-upstream.network',
|
||||
'25-veth-downstream-veth97.netdev', '25-dhcp-pd-downstream-veth97.network', '25-dhcp-pd-downstream-veth97-peer.network',
|
||||
|
|
Loading…
Reference in a new issue