diff --git a/src/decode.h b/src/decode.h index 21d09199ac..aa31d49275 100644 --- a/src/decode.h +++ b/src/decode.h @@ -471,7 +471,12 @@ typedef struct DecodeThreadVars_ * \todo the mutex destroy & init is necessary because of the memset, reconsider */ #define PACKET_RECYCLE(p) do { \ - (p)->recursion_level = 0; \ + CLEAR_ADDR(&(p)->src); \ + CLEAR_ADDR(&(p)->dst); \ + (p)->sp = 0; \ + (p)->dp = 0; \ + (p)->proto = 0; \ + (p)->recursion_level = 0; \ (p)->flags = 0; \ (p)->flowflags = 0; \ (p)->flow = NULL; \ diff --git a/src/detect-ack.c b/src/detect-ack.c index 27b3190814..dd6f75d369 100644 --- a/src/detect-ack.c +++ b/src/detect-ack.c @@ -71,7 +71,7 @@ static int DetectAckMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, DetectAckData *data = (DetectAckData *)m->ctx; /* This is only needed on TCP packets */ - if (IPPROTO_TCP != p->proto) { + if (!(PKT_IS_TCP(p))) { return 0; } diff --git a/src/detect-seq.c b/src/detect-seq.c index 67873991d5..f4bd17388d 100644 --- a/src/detect-seq.c +++ b/src/detect-seq.c @@ -72,7 +72,7 @@ static int DetectSeqMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, DetectSeqData *data = (DetectSeqData *)m->ctx; /* This is only needed on TCP packets */ - if (IPPROTO_TCP != p->proto) { + if (!(PKT_IS_TCP(p))) { return 0; }