"DHCP4_SECURITY_CHECKS_DISABLED", "Invoked with command line option -X, Security checks are disabled!!",
"DHCP4_SERVER_FAILED", "server failed: %1",
"DHCP4_SERVER_INITIATED_DECLINE", "%1: Lease for addr %2 has been found to be already in use. The lease will be unavailable for %3 seconds.",
- "DHCP4_SERVER_INITIATED_DECLINE_ADD_FAILED", "%1: error adding a lease for address %2",
+ "DHCP4_SERVER_INITIATED_DECLINE_ADD_FAILED", "%1: error adding a lease for address %2: %3",
"DHCP4_SERVER_INITIATED_DECLINE_RESOURCE_BUSY", "%1: error declining a lease for address %2",
"DHCP4_SERVER_INITIATED_DECLINE_UPDATE_FAILED", "%1: error updating lease for address %2",
"DHCP4_SHUTDOWN", "server shutdown",
the underlying problem of a misconfigured or rogue device is not solved, this
address may be declined again in the future.
-% DHCP4_SERVER_INITIATED_DECLINE_ADD_FAILED %1: error adding a lease for address %2
+% DHCP4_SERVER_INITIATED_DECLINE_ADD_FAILED %1: error adding a lease for address %2: %3
This error message indicates that the server failed to add a DECLINED lease to
the lease store. The first argument includes the client and the transaction
identification information. The second argument holds the IPv4 address for which
-the decline was attempted.
+the decline was attempted, the last one the error message.
% DHCP4_SERVER_INITIATED_DECLINE_RESOURCE_BUSY %1: error declining a lease for address %2
This error message indicates that while one server thread was attempting to mark
}
if (!lease_exists) {
- bool done;
try {
- done = LeaseMgrFactory::instance().addLease(lease);
+ if (!LeaseMgrFactory::instance().addLease(lease)) {
+ isc_throw(Unexpected, "lease already exists");
+ }
} catch (const Exception& ex) {
- done = false;
- }
- if (!done) {
LOG_ERROR(lease4_logger, DHCP4_SERVER_INITIATED_DECLINE_ADD_FAILED)
.arg(query->getLabel())
- .arg(lease->addr_.toText());
+ .arg(lease->addr_.toText())
+ .arg(ex.what());
return;
}
}