summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/cfg_db_access.cc
diff options
context:
space:
mode:
authorMarcin Siodelski <marcin@isc.org>2020-10-04 20:22:22 +0200
committerFrancis Dupont <fdupont@isc.org>2020-10-08 15:44:39 +0200
commit8689ad941451e1b6fad832fe78f3a8f854ac08d5 (patch)
tree7977e13a50ac62686462ee6e15a01c64b6303f11 /src/lib/dhcpsrv/cfg_db_access.cc
parent[#1428] Basic support for ip-reservations-unique (diff)
downloadkea-8689ad941451e1b6fad832fe78f3a8f854ac08d5.tar.xz
kea-8689ad941451e1b6fad832fe78f3a8f854ac08d5.zip
[#1428] Configure unique IP in HostMgr
The CfgDbAccess class configures HostMgr according to the setting of the ip-reservations-unique.
Diffstat (limited to 'src/lib/dhcpsrv/cfg_db_access.cc')
-rw-r--r--src/lib/dhcpsrv/cfg_db_access.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/dhcpsrv/cfg_db_access.cc b/src/lib/dhcpsrv/cfg_db_access.cc
index b004a64350..688e8088fb 100644
--- a/src/lib/dhcpsrv/cfg_db_access.cc
+++ b/src/lib/dhcpsrv/cfg_db_access.cc
@@ -53,7 +53,7 @@ CfgDbAccess::getHostDbAccessStringList() const {
}
void
-CfgDbAccess::createManagers() const {
+CfgDbAccess::createManagers() {
// Recreate lease manager.
LeaseMgrFactory::destroy();
LeaseMgrFactory::create(getLeaseDbAccessString());
@@ -74,6 +74,9 @@ CfgDbAccess::createManagers() const {
// Check for a host cache.
HostMgr::checkCacheBackend(true);
+
+ // Populate the ip-reservations-unique global setting to HostMgr.
+ HostMgr::instance().setIPReservationsUnique(ip_reservations_unique_);
}
std::string