1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-06 12:58:22 +03:00

test-network: use dnsmasq for testing DHCP4-6RD

This commit is contained in:
Yu Watanabe 2021-12-18 07:56:42 +09:00
parent f56af3b4c8
commit 4862fb693d
2 changed files with 8 additions and 23 deletions

View File

@ -1,22 +0,0 @@
default-lease-time 2592000;
preferred-lifetime 604800;
default-lease-time 600;
max-lease-time 7200;
option domain-name-servers 10.0.0.2;
option domain-search "test.example.com","example.com";
# ipv4masklen = 8
# 6rd prefix = 2001:db8::/32
# BR address = 10.0.0.1
option option-6rd code 212 = {
integer 8, integer 8, ip6-address, array of ip-address
};
option option-6rd 8 32 2001:db8:: 10.0.0.1;
subnet 10.0.0.0 netmask 255.0.0.0 {
# Addresses available to clients
range 10.100.100.100 10.100.100.199;
}

View File

@ -5028,11 +5028,13 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
def setUp(self):
stop_isc_dhcpd()
stop_dnsmasq()
remove_links(self.links)
stop_networkd(show_logs=False)
def tearDown(self):
stop_isc_dhcpd()
stop_dnsmasq()
remove_links(self.links)
remove_unit_from_networkd_path(self.units)
stop_networkd(show_logs=True)
@ -5243,7 +5245,12 @@ class NetworkdDHCPPDTests(unittest.TestCase, Utilities):
start_networkd()
self.wait_online(['veth-peer:routable'])
start_isc_dhcpd('veth-peer', 'isc-dhcpd-6rd.conf', ip='-4')
'''
ipv4masklen: 8
6rd-prefix: 2001:db8::/32
br-addresss: 10.0.0.1
'''
start_dnsmasq(additional_options='--dhcp-option=212,08:20:20:01:0d:b8:00:00:00:00:00:00:00:00:00:00:00:00:0a:00:00:01', ipv4_range='10.100.100.100,10.100.100.200', ipv4_router='10.0.0.1', lease_time='2m')
self.wait_online(['veth99:routable', 'test1:routable', 'dummy98:routable', 'dummy99:degraded',
'veth97:routable', 'veth97-peer:routable', 'veth98:routable', 'veth98-peer:routable'])