From: Francis Dupont Date: Sat, 21 Nov 2015 14:58:12 +0000 (+0100) Subject: [4097a] Removed merging of global configured options into subnets X-Git-Tag: trac4204fd_base~2^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db7f698d7f63112921ce1fb9db376b7ee9ca4798;p=thirdparty%2Fkea.git [4097a] Removed merging of global configured options into subnets --- diff --git a/src/lib/dhcpsrv/cfg_option.h b/src/lib/dhcpsrv/cfg_option.h index 5db8177dc1..2fea357acc 100644 --- a/src/lib/dhcpsrv/cfg_option.h +++ b/src/lib/dhcpsrv/cfg_option.h @@ -264,6 +264,8 @@ public: /// as a parameter. If an item exists in the destination it is not /// copied. /// + /// @note: this method is not longer used so should become private. + /// /// @param [out] other Configuration object to merge to. void mergeTo(CfgOption& other) const; diff --git a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc index 49ecadbe01..18d2cc846e 100644 --- a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc +++ b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc @@ -1256,8 +1256,10 @@ SubnetConfigParser::createSubnet() { subnet_->setIface(iface); } - // Merge globally defined options to the subnet specific options. - CfgMgr::instance().getStagingCfg()->getCfgOption()->mergeTo(*options_); + // Here globally defined options were merged to the subnet specific + // options but it is no longer the case (they have a different + // and not consecutive priority). + // Copy all options to the subnet configuration. options_->copyTo(*subnet_->getCfgOption()); // Append suboptions to the top-level options.