]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5442] Add log messages when packet is dropped.
authorMarcin Siodelski <marcin@isc.org>
Tue, 5 Dec 2017 10:37:04 +0000 (11:37 +0100)
committerMarcin Siodelski <marcin@isc.org>
Tue, 5 Dec 2017 10:37:04 +0000 (11:37 +0100)
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_srv.cc

index 15b9e8272389e0a57c087b0d18bcdc68a5b1f71f..05426d29e7a0cf3f56a3a8b5846fe21479200edc 100644 (file)
@@ -404,6 +404,12 @@ will not send a response but will instead ignore the packet. The first
 argument contains the client and transaction identification information.
 The second argument includes the details of the error.
 
+% DHCP4_PACKET_DROP_0008 %1: DHCP service is globally disabled
+This debug message is issued when a packet is dropped because the DHCP service
+has been temporarily disabled. This affects all received DHCP packets. The
+service may be enabled by the "dhcp-enable" control command or automatically
+after a specified amount of time since receiving "dhcp-disable" command.
+
 % DHCP4_PACKET_NAK_0001 %1: failed to select a subnet for incoming packet, src %2, type %3
 This error message is output when a packet was received from a subnet
 for which the DHCPv4 server has not been configured. The most probable
index 6dda15b7e2ebd48ace0e91d0927533aca7900d59..ca2e58abdc51e218e0f9443ad5eadd0504ef011b 100644 (file)
@@ -806,6 +806,9 @@ Dhcpv4Srv::run_one() {
 
     // If the DHCP service has been globally disabled, drop the packet.
     if (network_state_.isServiceEnabled()) {
+        LOG_DEBUG(bad_packet4_logger, DBG_DHCP4_BASIC,
+                  DHCP4_PACKET_DROP_0008)
+            .arg(query->getLabel());
         processPacket(query, rsp);
     }
 
index 4fde8c77ed415aa7623398487ca781b8e0be9daf..d895a45493cfb74bbdbb48f7df2c25156cd32714 100644 (file)
@@ -409,6 +409,12 @@ server is about to open sockets on the specified port.
 A warning message issued when IfaceMgr fails to open and bind a socket. The reason
 for the failure is appended as an argument of the log message.
 
+% DHCP6_PACKET_DROP_DHCP_DISABLED %1: DHCP service is globally disabled
+This debug message is issued when a packet is dropped because the DHCP service
+has been temporarily disabled. This affects all received DHCP packets. The
+service may be enabled by the "dhcp-enable" control command or automatically
+after a specified amount of time since receiving "dhcp-disable" command.
+
 % DHCP6_PACKET_DROP_PARSE_FAIL failed to parse packet from %1 to %2, received over interface %3, reason: %4
 The DHCPv4 server has received a packet that it is unable to
 interpret. The reason why the packet is invalid is included in the message.
index df488d29c3e7be999c3521af7e20a7db29063953..c39073519e4ffe6498e8dac3461255832b1ebdd3 100644 (file)
@@ -470,6 +470,9 @@ void Dhcpv6Srv::run_one() {
 
     // If the DHCP service has been globally disabled, drop the packet.
     if (network_state_.isServiceEnabled()) {
+        LOG_DEBUG(bad_packet6_logger, DBG_DHCP6_DETAIL_DATA,
+                  DHCP6_PACKET_DROP_DHCP_DISABLED)
+            .arg(query->getLabel());
         processPacket(query, rsp);
     }