used to receive DHCPv4 traffic. Sockets on this interface will not be opened
by the Interface Manager until interface is enabled.
+% DHCP4_DECLINE_FAIL %1: error on decline lease for address %2: %3
+This error message indicates that the software failed to deline a
+lease from the lease database due to an error during a database
+operation. The first argument includes the client and the transaction
+identification information. The second argument holds the IPv4 address
+which decline was attempted. The last one contains the reason for
+failure.
+
% DHCP4_DECLINE_LEASE Received DHCPDECLINE for addr %1 from client %2. The lease will be unavailable for %3 seconds.
This informational message is printed when a client received an address, but
discovered that it is being used by some other device and notified the server by
// way.
lease->decline(CfgMgr::instance().getCurrentCfg()->getDeclinePeriod());
- LeaseMgrFactory::instance().updateLease4(lease);
+ try {
+ LeaseMgrFactory::instance().updateLease4(lease);
+ } catch (const Exception& ex) {
+ // Update failed.
+ LOG_ERROR(lease4_logger, DHCP4_DECLINE_FAIL)
+ .arg(decline->getLabel())
+ .arg(lease->addr_.toText())
+ .arg(ex.what());
+ return;
+ }
// Remove existing DNS entries for the lease, if any.
// queueNCR will do the necessary checks and will skip the update, if not needed.
+<<<<<<< HEAD
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu May 21 2020 12:11
+=======
+// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Sun May 24 2020 11:35
+>>>>>>> [#1232] Added a try and log
#include <cstddef>
#include <log/message_types.h>
extern const isc::log::MessageID DHCP6_DDNS_RESPONSE_FQDN_DATA = "DHCP6_DDNS_RESPONSE_FQDN_DATA";
extern const isc::log::MessageID DHCP6_DDNS_SEND_FQDN = "DHCP6_DDNS_SEND_FQDN";
extern const isc::log::MessageID DHCP6_DEACTIVATE_INTERFACE = "DHCP6_DEACTIVATE_INTERFACE";
+extern const isc::log::MessageID DHCP6_DECLINE_FAIL = "DHCP6_DECLINE_FAIL";
extern const isc::log::MessageID DHCP6_DECLINE_FAIL_DUID_MISMATCH = "DHCP6_DECLINE_FAIL_DUID_MISMATCH";
extern const isc::log::MessageID DHCP6_DECLINE_FAIL_IAID_MISMATCH = "DHCP6_DECLINE_FAIL_IAID_MISMATCH";
extern const isc::log::MessageID DHCP6_DECLINE_FAIL_LEASE_WITHOUT_DUID = "DHCP6_DECLINE_FAIL_LEASE_WITHOUT_DUID";
"DHCP6_DDNS_RESPONSE_FQDN_DATA", "%1: including FQDN option in the server's response: %2",
"DHCP6_DDNS_SEND_FQDN", "sending DHCPv6 Client FQDN Option to the client: %1",
"DHCP6_DEACTIVATE_INTERFACE", "deactivate interface %1",
+ "DHCP6_DECLINE_FAIL", "%1: error on decline lease for address %2: %3",
"DHCP6_DECLINE_FAIL_DUID_MISMATCH", "Client %1 sent DECLINE for address %2, but it belongs to client with DUID %3",
"DHCP6_DECLINE_FAIL_IAID_MISMATCH", "Client %1 sent DECLINE for address %2, but used a wrong IAID (%3), instead of expected %4",
"DHCP6_DECLINE_FAIL_LEASE_WITHOUT_DUID", "Client %1 sent DECLINE for address %2, but the associated lease has no DUID",
used to receive DHCPv6 traffic. Sockets on this interface will not be opened
by the Interface Manager until interface is enabled.
+% DHCP6_DECLINE_FAIL %1: error on decline lease for address %2: %3
+This error message indicates that the software failed to deline a
+lease from the lease database due to an error during a database
+operation. The first argument includes the client and the transaction
+identification information. The second argument holds the IPv6 address
+which decline was attempted. The last one contains the reason for
+failure.
+
% DHCP6_DECLINE_FAIL_DUID_MISMATCH Client %1 sent DECLINE for address %2, but it belongs to client with DUID %3
This informational message is printed when a client attempts to decline
a lease, but that lease belongs to a different client. The decline request
// way.
lease->decline(CfgMgr::instance().getCurrentCfg()->getDeclinePeriod());
- LeaseMgrFactory::instance().updateLease6(lease);
+ try {
+ LeaseMgrFactory::instance().updateLease6(lease);
+ } catch (const Exception& ex) {
+ // Update failed.
+ LOG_ERROR(lease6_logger, DHCP6_DECLINE_FAIL)
+ .arg(decline->getLabel())
+ .arg(lease->addr_.toText())
+ .arg(ex.what());
+ return (false);
+ }
// Check if a lease has flags indicating that the FQDN update has
// been performed. If so, create NameChangeRequest which removes