diff options
author | Piotrek Zadroga <piotrek@isc.org> | 2024-04-24 21:21:21 +0200 |
---|---|---|
committer | Piotrek Zadroga <piotrek@isc.org> | 2024-04-26 14:42:46 +0200 |
commit | 7b93d1b62b0d9e1f864063b41effdca2c54ee778 (patch) | |
tree | d634bf35206bba8eedf1802bd1ed607f96d1cdf6 /src | |
parent | [#2820] add tid in some leases logs (diff) | |
download | kea-7b93d1b62b0d9e1f864063b41effdca2c54ee778.tar.xz kea-7b93d1b62b0d9e1f864063b41effdca2c54ee778.zip |
[#2820] add tid in some options logs
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/dhcp4/dhcp4_messages.cc | 4 | ||||
-rw-r--r-- | src/bin/dhcp4/dhcp4_messages.mes | 4 | ||||
-rw-r--r-- | src/bin/dhcp4/dhcp4_srv.cc | 2 | ||||
-rw-r--r-- | src/bin/dhcp6/dhcp6_messages.cc | 6 | ||||
-rw-r--r-- | src/bin/dhcp6/dhcp6_messages.mes | 6 | ||||
-rw-r--r-- | src/bin/dhcp6/dhcp6_srv.cc | 6 |
6 files changed, 17 insertions, 11 deletions
diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc index 2135c1886c..187bfc65e1 100644 --- a/src/bin/dhcp4/dhcp4_messages.cc +++ b/src/bin/dhcp4/dhcp4_messages.cc @@ -198,7 +198,7 @@ const char* values[] = { "DHCP4_ALREADY_RUNNING", "%1 already running? %2", "DHCP4_BUFFER_RECEIVED", "received buffer from %1:%2 to %3:%4 over interface %5", "DHCP4_BUFFER_RECEIVE_FAIL", "error on attempt to receive packet: %1", - "DHCP4_BUFFER_UNPACK", "parsing buffer received from %1 to %2 over interface %3", + "DHCP4_BUFFER_UNPACK", "%1: parsing buffer received from %2 to %3 over interface %4", "DHCP4_BUFFER_WAIT_SIGNAL", "signal received while waiting for next packet", "DHCP4_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1", "DHCP4_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1", @@ -320,7 +320,7 @@ const char* values[] = { "DHCP4_PACKET_NAK_0002", "%1: invalid address %2 requested by INIT-REBOOT", "DHCP4_PACKET_NAK_0003", "%1: failed to advertise a lease, client sent ciaddr %2, requested-ip-address %3", "DHCP4_PACKET_NAK_0004", "%1: failed to grant a lease, client sent ciaddr %2, requested-ip-address %3", - "DHCP4_PACKET_OPTIONS_SKIPPED", "An error unpacking an option, caused subsequent options to be skipped: %1", + "DHCP4_PACKET_OPTIONS_SKIPPED", "%1: An error unpacking an option, caused subsequent options to be skipped: %2", "DHCP4_PACKET_OPTION_UNPACK_FAIL", "An error unpacking the option %1: %2", "DHCP4_PACKET_PACK", "%1: preparing on-wire format of the packet to be sent", "DHCP4_PACKET_PACK_FAIL", "%1: preparing on-wire-format of the packet to be sent failed %2", diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index 2ee2c43cc1..2cd097675d 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -33,7 +33,7 @@ The DHCPv4 server tried to receive a packet but an error occurred during this attempt. The reason for the error is included in the message. -% DHCP4_BUFFER_UNPACK parsing buffer received from %1 to %2 over interface %3 +% DHCP4_BUFFER_UNPACK %1: parsing buffer received from %2 to %3 over interface %4 This debug message is issued when the server starts parsing the received buffer holding the DHCPv4 message. The arguments specify the source and destination IPv4 addresses as well as the interface over which the buffer has @@ -763,7 +763,7 @@ identification information. The second argument contains the IPv4 address in the ciaddr field. The third argument contains the IPv4 address in the requested-ip-address option (if present). -% DHCP4_PACKET_OPTIONS_SKIPPED An error unpacking an option, caused subsequent options to be skipped: %1 +% DHCP4_PACKET_OPTIONS_SKIPPED %1: An error unpacking an option, caused subsequent options to be skipped: %2 A debug message issued when an option failed to unpack correctly, making it impossible to unpack the remaining options in the packet. The server will server will still attempt to service the packet. diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index f189aee01f..090bfbbbb1 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -1321,6 +1321,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr query, bool allow_answer_park) { if (!skip_unpack) { try { LOG_DEBUG(options4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_UNPACK) + .arg(query->getLabel()) .arg(query->getRemoteAddr().toText()) .arg(query->getLocalAddr().toText()) .arg(query->getIface()); @@ -1330,6 +1331,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr query, bool allow_answer_park) { // anyway. Log it and let's hope for the best. LOG_DEBUG(options4_logger, DBG_DHCP4_DETAIL, DHCP4_PACKET_OPTIONS_SKIPPED) + .arg(query->getLabel()) .arg(e.what()); } catch (const std::exception& e) { // Failed to parse the packet. diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc index 878314c884..0e3ff87abb 100644 --- a/src/bin/dhcp6/dhcp6_messages.cc +++ b/src/bin/dhcp6/dhcp6_messages.cc @@ -189,7 +189,7 @@ const char* values[] = { "DHCP6_ADD_STATUS_CODE_FOR_IA", "%1: adding Status Code to IA with iaid=%2: %3", "DHCP6_ALREADY_RUNNING", "%1 already running? %2", "DHCP6_BUFFER_RECEIVED", "received buffer from %1:%2 to %3:%4 over interface %5", - "DHCP6_BUFFER_UNPACK", "parsing buffer received from %1 to %2 over interface %3", + "DHCP6_BUFFER_UNPACK", "%1: parsing buffer received from %2 to %3 over interface %4", "DHCP6_BUFFER_WAIT_SIGNAL", "signal received while waiting for next packet", "DHCP6_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1", "DHCP6_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1", @@ -289,7 +289,7 @@ const char* values[] = { "DHCP6_PACKET_DROP_PARSE_FAIL", "%1: failed to parse packet from %2 to %3, received over interface %4, reason: %5, %6", "DHCP6_PACKET_DROP_SERVERID_MISMATCH", "%1: dropping packet with server identifier: %2, server is using: %3", "DHCP6_PACKET_DROP_UNICAST", "%1: dropping unicast %2 packet as this packet should be sent to multicast", - "DHCP6_PACKET_OPTIONS_SKIPPED", "An error unpacking an option, caused subsequent options to be skipped: %1", + "DHCP6_PACKET_OPTIONS_SKIPPED", "%1: An error unpacking an option, caused subsequent options to be skipped: %2", "DHCP6_PACKET_PROCESS_EXCEPTION", "exception occurred during packet processing", "DHCP6_PACKET_PROCESS_FAIL", "%1: processing of %2 message received from %3 failed: %4", "DHCP6_PACKET_PROCESS_STD_EXCEPTION", "exception occurred during packet processing: %1", @@ -298,7 +298,7 @@ const char* values[] = { "DHCP6_PACKET_RECEIVE_FAIL", "error on attempt to receive packet: %1", "DHCP6_PACKET_SEND", "%1: trying to send packet %2 (type %3) from [%4]:%5 to [%6]:%7 on interface %8", "DHCP6_PACKET_SEND_FAIL", "failed to send DHCPv6 packet: %1", - "DHCP6_PACK_FAIL", "failed to assemble response correctly", + "DHCP6_PACK_FAIL", "1%: failed to assemble response correctly: %2", "DHCP6_PARSER_COMMIT_EXCEPTION", "parser failed to commit changes", "DHCP6_PARSER_COMMIT_FAIL", "parser failed to commit changes: %1", "DHCP6_PARSER_EXCEPTION", "failed to create or run parser for configuration element %1", diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index ecd715a0a8..c2ae90127e 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -48,7 +48,7 @@ over the socket. When the message is logged the contents of the received packet hasn't been parsed yet. The only available information is the interface and the source and destination addresses/ports. -% DHCP6_BUFFER_UNPACK parsing buffer received from %1 to %2 over interface %3 +% DHCP6_BUFFER_UNPACK %1: parsing buffer received from %2 to %3 over interface %4 This debug message is issued when the server starts parsing the received buffer holding the DHCPv6 message. The arguments specify the source and destination addresses as well as the interface over which the buffer has @@ -647,7 +647,7 @@ because packets of this type must be sent to multicast. The first argument specifies the client and transaction identification information, the second argument specifies packet type. -% DHCP6_PACKET_OPTIONS_SKIPPED An error unpacking an option, caused subsequent options to be skipped: %1 +% DHCP6_PACKET_OPTIONS_SKIPPED %1: An error unpacking an option, caused subsequent options to be skipped: %2 A debug message issued when an option failed to unpack correctly, making it impossible to unpack the remaining options in the packet. The server will server will still attempt to service the packet. @@ -698,7 +698,7 @@ This error is output if the IPv6 DHCP server fails to send an assembled DHCP message to a client. The reason for the error is included in the message. -% DHCP6_PACK_FAIL failed to assemble response correctly +% DHCP6_PACK_FAIL 1%: failed to assemble response correctly: %2 This error is output if the server failed to assemble the data to be returned to the client into a valid packet. The reason is most likely to be to a programming error: please raise a bug report. diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 1bfe099b1c..33921338ac 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -805,6 +805,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr query) { if (!skip_unpack) { try { LOG_DEBUG(options6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_UNPACK) + .arg(query->getLabel()) .arg(query->getRemoteAddr().toText()) .arg(query->getLocalAddr().toText()) .arg(query->getIface()); @@ -814,6 +815,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr query) { // anyway. Log it and let's hope for the best. LOG_DEBUG(options6_logger, DBG_DHCP6_DETAIL, DHCP6_PACKET_OPTIONS_SKIPPED) + .arg(query->getLabel()) .arg(e.what()); } catch (const std::exception &e) { // Failed to parse the packet. @@ -1373,7 +1375,9 @@ Dhcpv6Srv::processPacketPktSend(hooks::CalloutHandlePtr& callout_handle, try { rsp->pack(); } catch (const std::exception& e) { - LOG_ERROR(options6_logger, DHCP6_PACK_FAIL).arg(e.what()); + LOG_ERROR(options6_logger, DHCP6_PACK_FAIL) + .arg(query->getLabel()) + .arg(e.what()); return; } |