]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3477] Fixed checkConfigFiles
authorFrancis Dupont <fdupont@isc.org>
Tue, 23 Jul 2024 08:06:34 +0000 (10:06 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 1 Aug 2024 07:23:54 +0000 (09:23 +0200)
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc

index 9161acf841361d3eeb146f49b43a00de53e02081..67364ea377b444ef47f0f162550b4eceaa923120 100644 (file)
@@ -2945,18 +2945,15 @@ Dhcpv4SrvTest::loadConfigFile(const string& path) {
             removeTlsParameters(host);
         }
     }
-    // Remove TLS parameters and authentication.
+    // Remove authentication clients using files.
     ConstElementPtr control_sockets = dhcp4->get("control-socket");
     if (control_sockets) {
-        removeTlsParameters(control_sockets);
         removeAuthFiles(control_sockets);
     }
     control_sockets = dhcp4->get("control-sockets");
     if (control_sockets) {
         for (int i = 0; i < control_sockets->size(); ++i) {
-            ConstElementPtr control_socket = control_sockets->get(i);
-            removeTlsParameters(control_socket);
-            removeAuthFiles(control_socket);
+            removeAuthFiles(control_sockets->get(i));
         }
     }
 
index 503f23e613e5088bc4395ce5583805a17b66d1c6..c84a44be60a9198ea61d8d2a0115a0c8f82f0d70 100644 (file)
@@ -309,18 +309,15 @@ Dhcpv6SrvTest::loadConfigFile(const string& path) {
             removeTlsParameters(host);
         }
     }
-    // Remove TLS parameters and authentication.
+    // Remove authentication clients using files.
     ConstElementPtr control_sockets = dhcp6->get("control-socket");
     if (control_sockets) {
-        removeTlsParameters(control_sockets);
         removeAuthFiles(control_sockets);
     }
     control_sockets = dhcp6->get("control-sockets");
     if (control_sockets) {
         for (int i = 0; i < control_sockets->size(); ++i) {
-            ConstElementPtr control_socket = control_sockets->get(i);
-            removeTlsParameters(control_socket);
-            removeAuthFiles(control_socket);
+            removeAuthFiles(control_sockets->get(i));
         }
     }
 
@@ -4040,7 +4037,7 @@ TEST_F(Dhcpv6SrvTest, generateFqdnUpdate) {
 
     // check that an IA_NA with an iaaddr was returned for the requested
     // address with lifetimes > 0.
-    boost::shared_ptr<Option6IAAddr> iaaddr = checkIA_NA(reply, 234, 1000, 2000); 
+    boost::shared_ptr<Option6IAAddr> iaaddr = checkIA_NA(reply, 234, 1000, 2000);
     ASSERT_TRUE(iaaddr);
     EXPECT_EQ(addr, iaaddr->getAddress());
     EXPECT_EQ(3000, iaaddr->getPreferred());