|
|
|
|
@ -69,13 +69,12 @@ static int g_keyword_thread_id = 0;
|
|
|
|
|
static HttpHeaderThreadDataConfig g_td_config = { BUFFER_SIZE_STEP };
|
|
|
|
|
|
|
|
|
|
static uint8_t *GetBufferForTX(
|
|
|
|
|
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags, uint32_t *buffer_len)
|
|
|
|
|
htp_tx_t *tx, DetectEngineThreadCtx *det_ctx, uint8_t flags, uint32_t *buffer_len)
|
|
|
|
|
{
|
|
|
|
|
*buffer_len = 0;
|
|
|
|
|
|
|
|
|
|
HttpHeaderThreadData *hdr_td = NULL;
|
|
|
|
|
HttpHeaderBuffer *buf =
|
|
|
|
|
HttpHeaderGetBufferSpace(det_ctx, f, flags, g_keyword_thread_id, &hdr_td);
|
|
|
|
|
HttpHeaderBuffer *buf = HttpHeaderGetBufferSpace(det_ctx, flags, g_keyword_thread_id, &hdr_td);
|
|
|
|
|
if (unlikely(buf == NULL)) {
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
@ -186,7 +185,7 @@ static uint8_t DetectEngineInspectBufferHttpHeader(DetectEngineCtx *de_ctx,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32_t rawdata_len = 0;
|
|
|
|
|
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, f, flags, &rawdata_len);
|
|
|
|
|
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, flags, &rawdata_len);
|
|
|
|
|
if (rawdata_len == 0) {
|
|
|
|
|
SCLogDebug("no data");
|
|
|
|
|
if (engine->match_on_null && eof) {
|
|
|
|
|
@ -245,7 +244,7 @@ static void PrefilterMpmHttpHeader(DetectEngineThreadCtx *det_ctx, const void *p
|
|
|
|
|
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
|
|
|
|
|
if (buffer->inspect == NULL) {
|
|
|
|
|
uint32_t rawdata_len = 0;
|
|
|
|
|
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, f, flags, &rawdata_len);
|
|
|
|
|
uint8_t *rawdata = GetBufferForTX(txv, det_ctx, flags, &rawdata_len);
|
|
|
|
|
if (rawdata_len == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|