Use filter ID + 1.

This commit is contained in:
Christian Deacon
2025-02-26 16:30:37 -05:00
parent cb3af158f0
commit 353aedab42
2 changed files with 2 additions and 2 deletions

View File

@@ -23,5 +23,5 @@
#define USE_FLOW_RL #define USE_FLOW_RL
// Enables filter logging through XDP. // 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 #define ENABLE_FILTER_LOGGING

View File

@@ -146,7 +146,7 @@ int HandleRbEvent(void* ctx, void* data, size_t sz)
const char* protocol_str = GetProtocolStrById(e->protocol); 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; return 0;
} }