has failed. As a result, the server will exit. The reason for the
failure is given within the message.
+% DHCP4_SRV_D2STOP_ERROR error stopping IO with DHCP_DDNS during shutdown: %1
+This error message indicates that during shutdown, an erro occurred while
+stopping IO between the DHCPv4 server and the DHCP_DDNS server. This is
+probably due to a programmatic error is not likely to impact either server
+upon restart. The reason for the failure is given within the message.
+
% DHCP4_STARTED Kea DHCPv4 server version %1 started
This informational message indicates that the DHCPv4 server has
processed all configuration information and is ready to process
}
Dhcpv4Srv::~Dhcpv4Srv() {
+ try {
+ stopD2();
+ } catch(const std::exception& ex) {
+ // Highly unlikely, but lets Report it but go on
+ LOG_ERROR(dhcp4_logger, DHCP4_SRV_D2STOP_ERROR).arg(ex.what());
+ }
IfaceMgr::instance().closeSockets();
}
}
}
+void
+Dhcpv4Srv::stopD2() {
+ D2ClientMgr& d2_mgr = CfgMgr::instance().getD2ClientMgr();
+ if (d2_mgr.ddnsEnabled()) {
+ // Updates are enabled, so lets stop the sender
+ d2_mgr.stopSender();
+ }
+}
+
void
Dhcpv4Srv::d2ClientErrorHandler(const
dhcp_ddns::NameChangeSender::Result result,
/// D2ClientErrors. This method does not catch exceptions.
void startD2();
+ /// @brief Stops DHCP_DDNS client IO if DDNS updates are enabled.
+ ///
+ /// If updates are enabled, it instructs the D2ClientMgr singleton to
+ /// leave send mode. If D2ClientMgr encounters errors it may throw
+ /// D2ClientErrors. This method does not catch exceptions.
+ void stopD2();
+
/// @brief Implements the error handler for DHCP_DDNS IO errors
///
/// Invoked when a NameChangeRequest send to kea-dhcp-ddns completes with
{
\"subnet\": \"10.0.0.0/8\",
\"pools\": [ { \"pool\": \"10.0.0.10-10.0.0.100\" } ]
- } ]
+ } ],
+ \"dhcp-ddns\": {
+ \"enable-updates\": true,
+ \"qualifying-suffix\": \"\"
+ }
},
\"Logging\":