diff --git a/src/detect-dns-query.h b/src/detect-dns-query.h index 7560523128..4065c41034 100644 --- a/src/detect-dns-query.h +++ b/src/detect-dns-query.h @@ -27,7 +27,7 @@ #include "app-layer-dns-common.h" void DetectDnsQueryRegister (void); -uint32_t DetectDnsQueryInspectMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - DNSState *dns_state, uint8_t flags, void *txv, uint64_t tx_id); + +uint32_t DetectDnsQueryInspectMpm(DetectEngineThreadCtx *det_ctx, void *txv); #endif /* __DETECT_DNS_QUERY_H__ */ diff --git a/src/detect-engine-dns.c b/src/detect-engine-dns.c index e68c1093b0..f3441e1afc 100644 --- a/src/detect-engine-dns.c +++ b/src/detect-engine-dns.c @@ -105,14 +105,12 @@ int DetectEngineInspectDnsQueryName(ThreadVars *tv, * \retval ret Number of matches. */ static inline uint32_t DnsQueryPatternSearch(DetectEngineThreadCtx *det_ctx, - const uint8_t *buffer, const uint32_t buffer_len, - const uint8_t flags) + const uint8_t *buffer, const uint32_t buffer_len) { SCEnter(); uint32_t ret = 0; - DEBUG_VALIDATE_BUG_ON(flags & STREAM_TOCLIENT); DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_dnsquery_ctx_ts == NULL); if (buffer_len >= det_ctx->sgh->mpm_dnsquery_ctx_ts->minlen) { @@ -130,12 +128,9 @@ static inline uint32_t DnsQueryPatternSearch(DetectEngineThreadCtx *det_ctx, * \param f locked flow * \param dns_state initialized dns state * - * \warning Make sure the flow/state is locked * \todo what should we return? Just the fact that we matched? */ -uint32_t DetectDnsQueryInspectMpm(DetectEngineThreadCtx *det_ctx, Flow *f, - DNSState *dns_state, uint8_t flags, void *txv, - uint64_t tx_id) +uint32_t DetectDnsQueryInspectMpm(DetectEngineThreadCtx *det_ctx, void *txv) { SCEnter(); @@ -152,8 +147,7 @@ uint32_t DetectDnsQueryInspectMpm(DetectEngineThreadCtx *det_ctx, Flow *f, buffer_len = query->len; cnt += DnsQueryPatternSearch(det_ctx, - buffer, buffer_len, - flags); + buffer, buffer_len); } SCReturnUInt(cnt); diff --git a/src/detect.c b/src/detect.c index 20fdde08d3..3907a0a6e3 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1027,7 +1027,7 @@ static inline void DetectMpmPrefilter(DetectEngineCtx *de_ctx, continue; PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_DNSQUERY); - DetectDnsQueryInspectMpm(det_ctx, p->flow, alstate, flags, tx, idx); + DetectDnsQueryInspectMpm(det_ctx, tx); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_DNSQUERY); } } @@ -1136,7 +1136,7 @@ static inline void DetectMpmPrefilter(DetectEngineCtx *de_ctx, continue; SCLogDebug("tx %p",tx); PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_DNSQUERY); - DetectDnsQueryInspectMpm(det_ctx, p->flow, alstate, flags, tx, idx); + DetectDnsQueryInspectMpm(det_ctx, tx); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_DNSQUERY); } }