]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1189] Fixed config-backend-pull commands
authorFrancis Dupont <fdupont@isc.org>
Tue, 28 Apr 2020 12:40:47 +0000 (14:40 +0200)
committerFrancis Dupont <fdupont@isc.org>
Mon, 15 Jun 2020 11:18:51 +0000 (13:18 +0200)
ChangeLog
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc

index b9a1a3f1c59b4a28696aae41615ea78577ebc92c..d0527dafdf46203f615349738330dbfcbbe93514 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1757.  [bug]           fdupont
+       config-backend-pull commands were fixed to be applied to the
+       current configuration
+       (Gitlab #1189)
+
 1756.  [bug]           fdupont
        Made the parking lot API generic thread safe.
        (Gitlab #1255)
index 569bfba4413c72011ce04e3d494d998f2753fa81..e18487723e0dd015de83378bd2ace7c6f2402e4d 100644 (file)
@@ -603,8 +603,10 @@ ControlledDhcpv4Srv::commandConfigBackendPullHandler(const std::string&,
     }
 
     // Code from cbFetchUpdates.
+    // The configuration to use is the current one because this is called
+    // after the configuration manager commit.
     try {
-        auto srv_cfg = CfgMgr::instance().getStagingCfg();
+        auto srv_cfg = CfgMgr::instance().getCurrentCfg();
         auto mode = CBControlDHCPv4::FetchMode::FETCH_UPDATE;
         server_->getCBControl()->databaseConfigFetch(srv_cfg, mode);
     } catch (const std::exception& ex) {
index 358c235905015c9b7ea7915c65d9d3785cdb4a25..eeb061797ff6a96a31064f1a5e01cc0993f8893b 100644 (file)
@@ -606,8 +606,10 @@ ControlledDhcpv6Srv::commandConfigBackendPullHandler(const std::string&,
     }
 
     // Code from cbFetchUpdates.
+    // The configuration to use is the current one because this is called
+    // after the configuration manager commit.
     try {
-        auto srv_cfg = CfgMgr::instance().getStagingCfg();
+        auto srv_cfg = CfgMgr::instance().getCurrentCfg();
         auto mode = CBControlDHCPv6::FetchMode::FETCH_UPDATE;
         server_->getCBControl()->databaseConfigFetch(srv_cfg, mode);
     } catch (const std::exception& ex) {