From: Thomas Markwalder Date: Thu, 28 Mar 2019 17:27:55 +0000 (-0400) Subject: [#413,!288] kea-dhcp6 now uses option defs from config backends X-Git-Tag: Kea-1.6.0-beta~270^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0192a912868f139bf4a2b0e8431c0f182ca6446;p=thirdparty%2Fkea.git [#413,!288] kea-dhcp6 now uses option defs from config backends 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 --- diff --git a/src/bin/dhcp6/tests/config_backend_unittest.cc b/src/bin/dhcp6/tests/config_backend_unittest.cc index 893f2384fd..a7add189c3 100644 --- a/src/bin/dhcp6/tests/config_backend_unittest.cc +++ b/src/bin/dhcp6/tests/config_backend_unittest.cc @@ -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" diff --git a/src/lib/dhcpsrv/srv_config.cc b/src/lib/dhcpsrv/srv_config.cc index 0aea3b208d..05a67bc3ee 100644 --- a/src/lib/dhcpsrv/srv_config.cc +++ b/src/lib/dhcpsrv/srv_config.cc @@ -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()));