mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 22:45:18 +00:00
[#1915] Converted some logs to PKT_HANDLING level
This commit is contained in:
committed by
Razvan Becheriu
parent
cc6adb9bb2
commit
320f2d2b97
@@ -1101,7 +1101,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) {
|
|||||||
// The response (rsp) is null so the caller (run_one) will
|
// The response (rsp) is null so the caller (run_one) will
|
||||||
// immediately return too.
|
// immediately return too.
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP4_DETAIL,
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING,
|
||||||
DHCP4_HOOK_BUFFER_RCVD_DROP)
|
DHCP4_HOOK_BUFFER_RCVD_DROP)
|
||||||
.arg(query->getRemoteAddr().toText())
|
.arg(query->getRemoteAddr().toText())
|
||||||
.arg(query->getLocalAddr().toText())
|
.arg(query->getLocalAddr().toText())
|
||||||
@@ -1114,7 +1114,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp, bool allow_packet_park) {
|
|||||||
// stage means that callouts did the parsing already, so server
|
// stage means that callouts did the parsing already, so server
|
||||||
// should skip parsing.
|
// should skip parsing.
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_SKIP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_SKIP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP4_DETAIL,
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING,
|
||||||
DHCP4_HOOK_BUFFER_RCVD_SKIP)
|
DHCP4_HOOK_BUFFER_RCVD_SKIP)
|
||||||
.arg(query->getRemoteAddr().toText())
|
.arg(query->getRemoteAddr().toText())
|
||||||
.arg(query->getLocalAddr().toText())
|
.arg(query->getLocalAddr().toText())
|
||||||
@@ -1401,7 +1401,7 @@ Dhcpv4Srv::processDhcp4Query(Pkt4Ptr& query, Pkt4Ptr& rsp,
|
|||||||
// Drop the park job on the packet, it isn't needed.
|
// Drop the park job on the packet, it isn't needed.
|
||||||
HooksManager::drop("leases4_committed", query);
|
HooksManager::drop("leases4_committed", query);
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP4_HOOKS, DHCP4_HOOK_LEASES4_COMMITTED_DROP)
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP4_HOOK_LEASES4_COMMITTED_DROP)
|
||||||
.arg(query->getLabel());
|
.arg(query->getLabel());
|
||||||
rsp.reset();
|
rsp.reset();
|
||||||
}
|
}
|
||||||
@@ -1474,7 +1474,7 @@ Dhcpv4Srv::processPacketPktSend(hooks::CalloutHandlePtr& callout_handle,
|
|||||||
|
|
||||||
/// Callouts decided to drop the packet.
|
/// Callouts decided to drop the packet.
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP4_HOOKS, DHCP4_HOOK_PACKET_SEND_DROP)
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP4_HOOK_PACKET_SEND_DROP)
|
||||||
.arg(rsp->getLabel());
|
.arg(rsp->getLabel());
|
||||||
rsp.reset();
|
rsp.reset();
|
||||||
return;
|
return;
|
||||||
@@ -3208,7 +3208,7 @@ Dhcpv4Srv::processRelease(Pkt4Ptr& release, AllocEngine::ClientContext4Ptr& cont
|
|||||||
if ((callout_handle->getStatus() == CalloutHandle::NEXT_STEP_SKIP) ||
|
if ((callout_handle->getStatus() == CalloutHandle::NEXT_STEP_SKIP) ||
|
||||||
(callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP)) {
|
(callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP)) {
|
||||||
skip = true;
|
skip = true;
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP4_HOOKS,
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING,
|
||||||
DHCP4_HOOK_LEASE4_RELEASE_SKIP)
|
DHCP4_HOOK_LEASE4_RELEASE_SKIP)
|
||||||
.arg(release->getLabel());
|
.arg(release->getLabel());
|
||||||
}
|
}
|
||||||
@@ -3358,7 +3358,7 @@ Dhcpv4Srv::declineLease(const Lease4Ptr& lease, const Pkt4Ptr& decline,
|
|||||||
// If any of them did, we will drop the packet.
|
// If any of them did, we will drop the packet.
|
||||||
if ((callout_handle->getStatus() == CalloutHandle::NEXT_STEP_SKIP) ||
|
if ((callout_handle->getStatus() == CalloutHandle::NEXT_STEP_SKIP) ||
|
||||||
(callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP)) {
|
(callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP)) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP4_HOOKS, DHCP4_HOOK_DECLINE_SKIP)
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP4_HOOK_DECLINE_SKIP)
|
||||||
.arg(decline->getLabel()).arg(lease->addr_.toText());
|
.arg(decline->getLabel()).arg(lease->addr_.toText());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace isc::util;
|
using namespace isc::util;
|
||||||
|
using namespace isc::log;
|
||||||
|
|
||||||
namespace isc {
|
namespace isc {
|
||||||
namespace dhcp {
|
namespace dhcp {
|
||||||
@@ -126,7 +127,7 @@ ClientHandler::tryLock(Pkt6Ptr query, ContinuationPtr cont) {
|
|||||||
if (next_query) {
|
if (next_query) {
|
||||||
// Logging a warning as it is supposed to be a rare event
|
// Logging a warning as it is supposed to be a rare event
|
||||||
// with well behaving clients...
|
// with well behaving clients...
|
||||||
LOG_WARN(bad_packet6_logger, DHCP6_PACKET_DROP_DUPLICATE)
|
LOG_DEBUG(bad_packet6_logger, DBGLVL_PKT_HANDLING, DHCP6_PACKET_DROP_DUPLICATE)
|
||||||
.arg(next_query->toText())
|
.arg(next_query->toText())
|
||||||
.arg(this_thread::get_id())
|
.arg(this_thread::get_id())
|
||||||
.arg(holder->query_->toText())
|
.arg(holder->query_->toText())
|
||||||
@@ -137,7 +138,7 @@ ClientHandler::tryLock(Pkt6Ptr query, ContinuationPtr cont) {
|
|||||||
} else {
|
} else {
|
||||||
// Logging a warning as it is supposed to be a rare event
|
// Logging a warning as it is supposed to be a rare event
|
||||||
// with well behaving clients...
|
// with well behaving clients...
|
||||||
LOG_WARN(bad_packet6_logger, DHCP6_PACKET_DROP_DUPLICATE)
|
LOG_DEBUG(bad_packet6_logger, DBGLVL_PKT_HANDLING, DHCP6_PACKET_DROP_DUPLICATE)
|
||||||
.arg(query->toText())
|
.arg(query->toText())
|
||||||
.arg(this_thread::get_id())
|
.arg(this_thread::get_id())
|
||||||
.arg(holder->query_->toText())
|
.arg(holder->query_->toText())
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <dhcp6/dhcp6_messages.h>
|
#include <dhcp6/dhcp6_messages.h>
|
||||||
#include <log/logger_support.h>
|
#include <log/logger_support.h>
|
||||||
|
#include <log/log_dbglevels.h>
|
||||||
#include <log/macros.h>
|
#include <log/macros.h>
|
||||||
|
|
||||||
namespace isc {
|
namespace isc {
|
||||||
|
@@ -685,7 +685,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) {
|
|||||||
// The response (rsp) is null so the caller (run_one) will
|
// The response (rsp) is null so the caller (run_one) will
|
||||||
// immediately return too.
|
// immediately return too.
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP6_DETAIL, DHCP6_HOOK_BUFFER_RCVD_DROP)
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP6_HOOK_BUFFER_RCVD_DROP)
|
||||||
.arg(query->getRemoteAddr().toText())
|
.arg(query->getRemoteAddr().toText())
|
||||||
.arg(query->getLocalAddr().toText())
|
.arg(query->getLocalAddr().toText())
|
||||||
.arg(query->getIface());
|
.arg(query->getIface());
|
||||||
@@ -811,7 +811,7 @@ Dhcpv6Srv::processPacket(Pkt6Ptr& query, Pkt6Ptr& rsp) {
|
|||||||
|
|
||||||
// Check the DROP special class.
|
// Check the DROP special class.
|
||||||
if (query->inClass("DROP")) {
|
if (query->inClass("DROP")) {
|
||||||
LOG_DEBUG(packet6_logger, DBG_DHCP6_BASIC, DHCP6_PACKET_DROP_DROP_CLASS)
|
LOG_DEBUG(packet6_logger, DBGLVL_PKT_HANDLING, DHCP6_PACKET_DROP_DROP_CLASS)
|
||||||
.arg(query->toText());
|
.arg(query->toText());
|
||||||
StatsMgr::instance().addValue("pkt6-receive-drop",
|
StatsMgr::instance().addValue("pkt6-receive-drop",
|
||||||
static_cast<int64_t>(1));
|
static_cast<int64_t>(1));
|
||||||
@@ -1067,7 +1067,7 @@ Dhcpv6Srv::processDhcp6Query(Pkt6Ptr& query, Pkt6Ptr& rsp) {
|
|||||||
// Drop the park job on the packet, it isn't needed.
|
// Drop the park job on the packet, it isn't needed.
|
||||||
HooksManager::drop("leases6_committed", query);
|
HooksManager::drop("leases6_committed", query);
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP6_HOOKS, DHCP6_HOOK_LEASES6_COMMITTED_DROP)
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP6_HOOK_LEASES6_COMMITTED_DROP)
|
||||||
.arg(query->getLabel());
|
.arg(query->getLabel());
|
||||||
rsp.reset();
|
rsp.reset();
|
||||||
}
|
}
|
||||||
@@ -1141,7 +1141,7 @@ Dhcpv6Srv::processPacketPktSend(hooks::CalloutHandlePtr& callout_handle,
|
|||||||
|
|
||||||
/// Callouts decided to drop the packet.
|
/// Callouts decided to drop the packet.
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP6_HOOKS, DHCP6_HOOK_PACKET_SEND_DROP)
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP6_HOOK_PACKET_SEND_DROP)
|
||||||
.arg(rsp->getLabel());
|
.arg(rsp->getLabel());
|
||||||
rsp.reset();
|
rsp.reset();
|
||||||
return;
|
return;
|
||||||
@@ -3616,7 +3616,7 @@ Dhcpv6Srv::declineLease(const Pkt6Ptr& decline, const Lease6Ptr lease,
|
|||||||
// Callouts decided to DROP the packet. Let's simply log it and
|
// Callouts decided to DROP the packet. Let's simply log it and
|
||||||
// return false, so callers will act accordingly.
|
// return false, so callers will act accordingly.
|
||||||
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
if (callout_handle->getStatus() == CalloutHandle::NEXT_STEP_DROP) {
|
||||||
LOG_DEBUG(hooks_logger, DBG_DHCP6_DETAIL, DHCP6_HOOK_DECLINE_DROP)
|
LOG_DEBUG(hooks_logger, DBGLVL_PKT_HANDLING, DHCP6_HOOK_DECLINE_DROP)
|
||||||
.arg(decline->getLabel())
|
.arg(decline->getLabel())
|
||||||
.arg(decline->getIface())
|
.arg(decline->getIface())
|
||||||
.arg(lease->addr_.toText());
|
.arg(lease->addr_.toText());
|
||||||
|
Reference in New Issue
Block a user