diff --git a/src/detect.c b/src/detect.c index caeb7a7f50..2cdd952bbc 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1278,15 +1278,14 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh SCLogDebug("pcap_cnt %"PRIu64, p->pcap_cnt); + p->alerts.cnt = 0; + det_ctx->pkts++; + /* No need to perform any detection on this packet, if the the given flag is set.*/ if (p->flags & PKT_NOPACKET_INSPECTION) { SCReturnInt(0); } - p->alerts.cnt = 0; - - det_ctx->pkts++; - /* grab the protocol state we will detect on */ if (p->flags & PKT_HAS_FLOW) { if (p->flags & PKT_STREAM_EOF) {