From 353aedab428f6ab2a684c9fc4900ce5079705bf7 Mon Sep 17 00:00:00 2001 From: Christian Deacon Date: Wed, 26 Feb 2025 16:30:37 -0500 Subject: [PATCH] Use filter ID + 1. --- src/common/config.h | 2 +- src/loader/utils/logging.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/config.h b/src/common/config.h index e5bd1d3..f32e66f 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -23,5 +23,5 @@ #define USE_FLOW_RL // Enables filter logging through XDP. -// If performance is a concerned, it is best to disable this feature by commenting out the below line with //. +// If performance is a concern, it is best to disable this feature by commenting out the below line with //. #define ENABLE_FILTER_LOGGING \ No newline at end of file diff --git a/src/loader/utils/logging.c b/src/loader/utils/logging.c index f27402c..ad7ce16 100644 --- a/src/loader/utils/logging.c +++ b/src/loader/utils/logging.c @@ -146,7 +146,7 @@ int HandleRbEvent(void* ctx, void* data, size_t sz) const char* protocol_str = GetProtocolStrById(e->protocol); - LogMsg(cfg, 0, 0, "[FILTER %d] %s %s packet '%s:%d' => '%s:%d' (PPS => %llu, BPS => %llu, Filter Block Time => %llu)...", e->filter_id, action, protocol_str, src_ip_str, htons(e->src_port), dst_ip_str, htons(e->dst_port), e->pps, e->bps, filter->blocktime); + LogMsg(cfg, 0, 0, "[FILTER %d] %s %s packet '%s:%d' => '%s:%d' (PPS => %llu, BPS => %llu, Filter Block Time => %llu)...", e->filter_id + 1, action, protocol_str, src_ip_str, htons(e->src_port), dst_ip_str, htons(e->dst_port), e->pps, e->bps, filter->blocktime); return 0; } \ No newline at end of file