]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: use dnsmasq for testing DHCP4-6RD
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 Dec 2021 22:56:42 +0000 (07:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Dec 2021 01:09:07 +0000 (10:09 +0900)
test/test-network/conf/isc-dhcpd-6rd.conf [deleted file]
test/test-network/systemd-networkd-tests.py

diff --git a/test/test-network/conf/isc-dhcpd-6rd.conf b/test/test-network/conf/isc-dhcpd-6rd.conf
deleted file mode 100644 (file)
index 0b32f4b..0000000
+++ /dev/null
@@ -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;
-}
index 0f4f7a3bd69fdf28b60dcf07e62a2194a5383ff6..009ab70699012db34d248f4a1a640ce44f7929ea 100755 (executable)
@@ -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'])