|
|
|
@ -547,8 +547,7 @@ static int HostBitsTestSig01(void)
|
|
|
|
"\r\n";
|
|
|
|
"\r\n";
|
|
|
|
uint16_t buflen = strlen((char *)buf);
|
|
|
|
uint16_t buflen = strlen((char *)buf);
|
|
|
|
Packet *p = SCMalloc(SIZE_OF_PACKET);
|
|
|
|
Packet *p = SCMalloc(SIZE_OF_PACKET);
|
|
|
|
if (unlikely(p == NULL))
|
|
|
|
FAIL_IF_NULL(p);
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
Signature *s = NULL;
|
|
|
|
Signature *s = NULL;
|
|
|
|
ThreadVars th_v;
|
|
|
|
ThreadVars th_v;
|
|
|
|
DetectEngineThreadCtx *det_ctx = NULL;
|
|
|
|
DetectEngineThreadCtx *det_ctx = NULL;
|
|
|
|
@ -577,19 +576,8 @@ static int HostBitsTestSig01(void)
|
|
|
|
|
|
|
|
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
|
|
|
|
|
|
|
|
|
|
|
|
if (de_ctx != NULL) {
|
|
|
|
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
|
|
|
|
SigGroupCleanup(de_ctx);
|
|
|
|
DetectEngineCtxFree(de_ctx);
|
|
|
|
SigCleanSignatures(de_ctx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (det_ctx != NULL) {
|
|
|
|
|
|
|
|
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (de_ctx != NULL) {
|
|
|
|
|
|
|
|
DetectEngineCtxFree(de_ctx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HostBitsTestShutdown();
|
|
|
|
HostBitsTestShutdown();
|
|
|
|
|
|
|
|
|
|
|
|
SCFree(p);
|
|
|
|
SCFree(p);
|
|
|
|
@ -637,8 +625,6 @@ static int HostBitsTestSig02(void)
|
|
|
|
"alert ip any any -> any any (hostbits:toggle,abc,dst; content:\"GET \"; sid:5;)");
|
|
|
|
"alert ip any any -> any any (hostbits:toggle,abc,dst; content:\"GET \"; sid:5;)");
|
|
|
|
FAIL_IF_NULL(s);
|
|
|
|
FAIL_IF_NULL(s);
|
|
|
|
|
|
|
|
|
|
|
|
SigGroupCleanup(de_ctx);
|
|
|
|
|
|
|
|
SigCleanSignatures(de_ctx);
|
|
|
|
|
|
|
|
DetectEngineCtxFree(de_ctx);
|
|
|
|
DetectEngineCtxFree(de_ctx);
|
|
|
|
PASS;
|
|
|
|
PASS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|