Commit 42d8288e authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3035] Remove outstanding NameChangeRequests from the queue when idle.

parent ee550617
......@@ -456,6 +456,9 @@ Dhcpv4Srv::run() {
LOG_ERROR(dhcp4_logger, DHCP4_PACKET_SEND_FAIL)
.arg(e.what());
}
// Send NameChangeRequests to the b10-dhcp_ddns module.
sendNameChangeRequests();
}
return (true);
......@@ -965,6 +968,15 @@ queueNameChangeRequest(const isc::dhcp_ddns::NameChangeType chg_type,
name_change_reqs_.push(ncr);
}
void
Dhcpv4Srv::sendNameChangeRequests() {
while (!name_change_reqs_.empty()) {
// @todo Once next NameChangeRequest is picked from the queue
// we should send it to the b10-dhcp_ddns module. Currently we
// just drop it.
name_change_reqs_.pop();
}
}
void
Dhcpv4Srv::assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer) {
......
......@@ -346,6 +346,17 @@ protected:
void queueNameChangeRequest(const isc::dhcp_ddns::NameChangeType chg_type,
const Lease4Ptr& lease);
/// @brief Sends all outstanding NameChangeRequests to b10-dhcp-ddns module.
///
/// The purpose of this function is to pick all outstanding
/// NameChangeRequests from the FIFO queue and send them to b10-dhcp-ddns
/// module.
///
/// @todo Currently this function simply removes all requests from the
/// queue but doesn't send them anywhere. In the future, the
/// NameChangeSender will be used to deliver requests to the other module.
void sendNameChangeRequests();
/// @brief Attempts to renew received addresses
///
/// Attempts to renew existing lease. This typically includes finding a lease that
......
......@@ -458,7 +458,7 @@ bool Dhcpv6Srv::run() {
.arg(e.what());
}
// Send NameChangeRequests to the b10-dhcp_ddns module.
// Send NameChangeRequests to the b10-dhcp-ddns module.
sendNameChangeRequests();
}
}
......@@ -1138,7 +1138,7 @@ void
Dhcpv6Srv::sendNameChangeRequests() {
while (!name_change_reqs_.empty()) {
// @todo Once next NameChangeRequest is picked from the queue
// we should send it to the bind10-dhcp_ddns module. Currently we
// we should send it to the b10-dhcp_ddns module. Currently we
// just drop it.
name_change_reqs_.pop();
}
......
......@@ -378,7 +378,7 @@ protected:
/// @brief Sends all outstanding NameChangeRequests to bind10-d2 module.
///
/// The purpose of this function is to pick all outstanding
/// NameChangeRequests from the FIFO queue and send them to bind10-dhcp-ddns
/// NameChangeRequests from the FIFO queue and send them to b10-dhcp-ddns
/// module.
///
/// @todo Currently this function simply removes all requests from the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment