From a4cb7fced025feede1c188ebe38f1f3b7cb503dd Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 22 Jun 2010 18:40:54 +0200 Subject: [PATCH] Fix thresholding code for packets that are neither (valid) ipv4 and ipv6. --- src/detect-engine-alert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/detect-engine-alert.c b/src/detect-engine-alert.c index 26faf1254f..74db4038ae 100644 --- a/src/detect-engine-alert.c +++ b/src/detect-engine-alert.c @@ -40,9 +40,12 @@ int PacketAlertHandle(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, { SCEnter(); int ret = 0; + DetectThresholdData *td = NULL; /* retrieve the sig match data */ - DetectThresholdData *td = SigGetThresholdType(s,p); + if (PKT_IS_IPV4(p) || PKT_IS_IPV6(p)) { + td = SigGetThresholdType(s,p); + } SCLogDebug("td %p", td);