From: Victor Julien Date: Fri, 17 Mar 2023 13:30:33 +0000 (+0100) Subject: detect/dns_query: remove obsolete tests X-Git-Tag: suricata-7.0.0-rc2~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bab0f31b16dbaa524e7ccbd452dbababd430b19;p=thirdparty%2Fsuricata.git detect/dns_query: remove obsolete tests --- diff --git a/src/detect-dns-query.c b/src/detect-dns-query.c index 05a0e1c536..045b51e98a 100644 --- a/src/detect-dns-query.c +++ b/src/detect-dns-query.c @@ -868,41 +868,12 @@ static int DetectDnsQueryTest05(void) PASS; } -static int DetectDnsQueryIsdataatParseTest(void) -{ - DetectEngineCtx *de_ctx = DetectEngineCtxInit(); - FAIL_IF_NULL(de_ctx); - de_ctx->flags |= DE_QUIET; - - Signature *s = DetectEngineAppendSig(de_ctx, - "alert dns any any -> any any (" - "dns_query; content:\"one\"; " - "isdataat:!4,relative; sid:1;)"); - FAIL_IF_NULL(s); - - SigMatch *sm = s->init_data->smlists_tail[g_dns_query_buffer_id]; - FAIL_IF_NULL(sm); - FAIL_IF_NOT(sm->type == DETECT_ISDATAAT); - - DetectIsdataatData *data = (DetectIsdataatData *)sm->ctx; - FAIL_IF_NOT(data->flags & ISDATAAT_RELATIVE); - FAIL_IF_NOT(data->flags & ISDATAAT_NEGATED); - FAIL_IF(data->flags & ISDATAAT_RAWBYTES); - - DetectEngineCtxFree(de_ctx); - PASS; -} - static void DetectDnsQueryRegisterTests(void) { UtRegisterTest("DetectDnsQueryTest01", DetectDnsQueryTest01); UtRegisterTest("DetectDnsQueryTest02", DetectDnsQueryTest02); UtRegisterTest("DetectDnsQueryTest03 -- tcp", DetectDnsQueryTest03); UtRegisterTest("DetectDnsQueryTest04 -- pcre", DetectDnsQueryTest04); - UtRegisterTest("DetectDnsQueryTest05 -- app layer event", - DetectDnsQueryTest05); - - UtRegisterTest("DetectDnsQueryIsdataatParseTest", - DetectDnsQueryIsdataatParseTest); + UtRegisterTest("DetectDnsQueryTest05 -- app layer event", DetectDnsQueryTest05); } #endif