From ee3900f92df66be3869024355a1528e914f1107e Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Wed, 22 Oct 2025 10:38:08 -0400 Subject: [PATCH] detect/ip.src: Allow use with transforms This commit registers ip.src/ip.dst properly so they can be used with transforms. Issue: 8015 (cherry picked from commit 7e0d6f4a1e2a6016ec43fd4b3d1e58d2021f9bbc) --- src/detect-ipaddr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/detect-ipaddr.c b/src/detect-ipaddr.c index a3d2c6b4c8..ab2335fc5a 100644 --- a/src/detect-ipaddr.c +++ b/src/detect-ipaddr.c @@ -30,6 +30,7 @@ #include "detect.h" #include "detect-parse.h" #include "detect-engine.h" +#include "detect-engine-buffer.h" #include "detect-engine-mpm.h" #include "detect-engine-prefilter.h" #include "detect-ipaddr.h" @@ -96,7 +97,8 @@ static int DetectSrcIPAddrBufferSetup(DetectEngineCtx *de_ctx, Signature *s, con { /* store list id. Content, pcre, etc will be added to the list at this * id. */ - s->init_data->list = g_src_ipaddr_buffer_id; + if (SCDetectBufferSetActiveList(de_ctx, s, g_src_ipaddr_buffer_id) < 0) + return -1; return 0; } @@ -105,7 +107,8 @@ static int DetectDestIPAddrBufferSetup(DetectEngineCtx *de_ctx, Signature *s, co { /* store list id. Content, pcre, etc will be added to the list at this * id. */ - s->init_data->list = g_dest_ipaddr_buffer_id; + if (SCDetectBufferSetActiveList(de_ctx, s, g_dest_ipaddr_buffer_id) < 0) + return -1; return 0; }