]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#413,!288] kea-dhcp6 now uses option defs from config backends
authorThomas Markwalder <tmark@isc.org>
Thu, 28 Mar 2019 17:27:55 +0000 (13:27 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 10 Apr 2019 17:36:13 +0000 (13:36 -0400)
src/bin/dhcp6/tests/config_backend_unittest.cc
    set the CfgMgr family to AF_INET6
    TEST_F(Dhcp6CBTest, mergeOptionDefs) - enabled test

src/lib/dhcpsrv/srv_config.cc
    SrvConfig::merge6(SrvConfig& other) - now merges
    option defs

src/bin/dhcp6/tests/config_backend_unittest.cc
src/lib/dhcpsrv/srv_config.cc

index 893f2384fd575bce29a81612e000cc6bfc2aa5cf..a7add189c3c1618482ee97324948ac69a3040b50 100644 (file)
@@ -98,6 +98,7 @@ public:
 
         // Create fresh context.
         resetConfiguration();
+        CfgMgr::instance().setFamily(AF_INET6);
     }
 
     /// Destructor
@@ -222,7 +223,7 @@ TEST_F(Dhcp6CBTest, mergeGlobals) {
 
 // This test verifies that externally configured option definitions
 // merged correctly into staging configuration.
-TEST_F(Dhcp6CBTest, DISABLED_mergeOptionDefs) {
+TEST_F(Dhcp6CBTest, mergeOptionDefs) {
     string base_config =
         "{ \n"
         "    \"option-def\": [ { \n"
index 0aea3b208dc643341630a3674d85d9be1e9055ec..05a67bc3ee77ddc72315d01b48ff3a9c2862cb3b 100644 (file)
@@ -206,13 +206,13 @@ SrvConfig::merge6(SrvConfig& other) {
     // Merge globals.
     mergeGlobals(other);
 
-#if 0
     // Merge option defs. We need to do this next so we
     // pass these into subsequent merges so option instances
     // at each level can be created based on the merged
     // definitions.
     cfg_option_def_->merge((*other.getCfgOptionDef()));
 
+#if 0
     // Merge options.
     cfg_option_->merge(cfg_option_def_, (*other.getCfgOption()));