|
@@ -229,6 +229,13 @@ Dhcpv6Srv::Dhcpv6Srv(uint16_t port)
|
|
|
}
|
|
|
|
|
|
Dhcpv6Srv::~Dhcpv6Srv() {
|
|
|
+ try {
|
|
|
+ stopD2();
|
|
|
+ } catch(const std::exception& ex) {
|
|
|
+ // Highly unlikely, but lets Report it but go on
|
|
|
+ LOG_ERROR(dhcp6_logger, DHCP6_SRV_D2STOP_ERROR).arg(ex.what());
|
|
|
+ }
|
|
|
+
|
|
|
IfaceMgr::instance().closeSockets();
|
|
|
|
|
|
LeaseMgrFactory::destroy();
|
|
@@ -2873,6 +2880,15 @@ Dhcpv6Srv::startD2() {
|
|
|
}
|
|
|
|
|
|
void
|
|
|
+Dhcpv6Srv::stopD2() {
|
|
|
+ D2ClientMgr& d2_mgr = CfgMgr::instance().getD2ClientMgr();
|
|
|
+ if (d2_mgr.ddnsEnabled()) {
|
|
|
+ // Updates are enabled, so lets stop the sender
|
|
|
+ d2_mgr.stopSender();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+void
|
|
|
Dhcpv6Srv::d2ClientErrorHandler(const
|
|
|
dhcp_ddns::NameChangeSender::Result result,
|
|
|
dhcp_ddns::NameChangeRequestPtr& ncr) {
|