Commit 5e495029 authored by Francis Dupont's avatar Francis Dupont
Browse files

[699-kea-s-v6-server-seems-to-be-missing-some-debug-logging-for-dhcp6_packet_s...

[699-kea-s-v6-server-seems-to-be-missing-some-debug-logging-for-dhcp6_packet_send] Added DHCP6_PACKET_SEND
parent e5e30d39
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 27 2019 19:57
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 27 2019 20:26
#include <cstddef>
#include <log/message_types.h>
......@@ -97,6 +97,7 @@ extern const isc::log::MessageID DHCP6_PACKET_PROCESS_FAIL = "DHCP6_PACKET_PROCE
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION = "DHCP6_PACKET_PROCESS_STD_EXCEPTION";
extern const isc::log::MessageID DHCP6_PACKET_RECEIVED = "DHCP6_PACKET_RECEIVED";
extern const isc::log::MessageID DHCP6_PACKET_RECEIVE_FAIL = "DHCP6_PACKET_RECEIVE_FAIL";
extern const isc::log::MessageID DHCP6_PACKET_SEND = "DHCP6_PACKET_SEND";
extern const isc::log::MessageID DHCP6_PACKET_SEND_FAIL = "DHCP6_PACKET_SEND_FAIL";
extern const isc::log::MessageID DHCP6_PACK_FAIL = "DHCP6_PACK_FAIL";
extern const isc::log::MessageID DHCP6_PARSER_COMMIT_EXCEPTION = "DHCP6_PARSER_COMMIT_EXCEPTION";
......@@ -238,6 +239,7 @@ const char* values[] = {
"DHCP6_PACKET_PROCESS_STD_EXCEPTION", "exception occurred during packet processing: %1",
"DHCP6_PACKET_RECEIVED", "%1: %2 (type %3) received from %4 to %5 on interface %6",
"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_PARSER_COMMIT_EXCEPTION", "parser failed to commit changes",
......
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 27 2019 19:57
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Thu Jun 27 2019 20:26
#ifndef DHCP6_MESSAGES_H
#define DHCP6_MESSAGES_H
......@@ -98,6 +98,7 @@ extern const isc::log::MessageID DHCP6_PACKET_PROCESS_FAIL;
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION;
extern const isc::log::MessageID DHCP6_PACKET_RECEIVED;
extern const isc::log::MessageID DHCP6_PACKET_RECEIVE_FAIL;
extern const isc::log::MessageID DHCP6_PACKET_SEND;
extern const isc::log::MessageID DHCP6_PACKET_SEND_FAIL;
extern const isc::log::MessageID DHCP6_PACK_FAIL;
extern const isc::log::MessageID DHCP6_PARSER_COMMIT_EXCEPTION;
......
......@@ -555,6 +555,12 @@ The IPv6 DHCP server tried to receive a packet but an error
occurred during this attempt. The reason for the error is included in
the message.
% DHCP6_PACKET_SEND %1: trying to send packet %2 (type %3) from [%4]:%5 to [%6]:%7 on interface %8
The arguments specify the client identification information (HW address
and client identifier), DHCP message name and type, source IPv6
address and port, destination IPv6 address and port and the
interface name.
% DHCP6_PACKET_SEND_FAIL failed to send DHCPv6 packet: %1
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
......
......@@ -997,6 +997,16 @@ Dhcpv6Srv::processPacketBufferSend(CalloutHandlePtr& callout_handle,
callout_handle->getArgument("response6", rsp);
}
LOG_DEBUG(packet6_logger, DBG_DHCP6_BASIC, DHCP6_PACKET_SEND)
.arg(rsp->getLabel())
.arg(rsp->getName())
.arg(static_cast<int>(rsp->getType()))
.arg(rsp->getLocalAddr().isV6Zero() ? "*" : rsp->getLocalAddr().toText())
.arg(rsp->getLocalPort())
.arg(rsp->getRemoteAddr())
.arg(rsp->getRemotePort())
.arg(rsp->getIface());
LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL_DATA, DHCP6_RESPONSE_DATA)
.arg(static_cast<int>(rsp->getType())).arg(rsp->toText());
......
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