From c0f265fd82cdf4fccad2eb8c53f37ce325d5d438 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 27 Feb 2015 00:04:11 +0100 Subject: [PATCH] http: fix stat_msg and stat_code state tracking --- src/detect-engine-hscd.c | 2 +- src/detect-engine-hsmd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detect-engine-hscd.c b/src/detect-engine-hscd.c index b54c79511d..aa9f6f7dcc 100644 --- a/src/detect-engine-hscd.c +++ b/src/detect-engine-hscd.c @@ -100,7 +100,7 @@ int DetectEngineInspectHttpStatCode(ThreadVars *tv, { htp_tx_t *tx = (htp_tx_t *)txv; if (tx->response_status == NULL) { - if (AppLayerParserGetStateProgress(IPPROTO_TCP, ALPROTO_HTTP, tx, STREAM_TOSERVER) > HTP_RESPONSE_LINE) + if (AppLayerParserGetStateProgress(IPPROTO_TCP, ALPROTO_HTTP, tx, STREAM_TOCLIENT) > HTP_RESPONSE_LINE) return DETECT_ENGINE_INSPECT_SIG_CANT_MATCH; else return DETECT_ENGINE_INSPECT_SIG_NO_MATCH; diff --git a/src/detect-engine-hsmd.c b/src/detect-engine-hsmd.c index 8881f3cf06..2c5176022a 100644 --- a/src/detect-engine-hsmd.c +++ b/src/detect-engine-hsmd.c @@ -100,7 +100,7 @@ int DetectEngineInspectHttpStatMsg(ThreadVars *tv, { htp_tx_t *tx = (htp_tx_t *)txv; if (tx->response_message == NULL) { - if (AppLayerParserGetStateProgress(IPPROTO_TCP, ALPROTO_HTTP, tx, STREAM_TOSERVER) > HTP_RESPONSE_LINE) + if (AppLayerParserGetStateProgress(IPPROTO_TCP, ALPROTO_HTTP, tx, STREAM_TOCLIENT) > HTP_RESPONSE_LINE) return DETECT_ENGINE_INSPECT_SIG_CANT_MATCH; else return DETECT_ENGINE_INSPECT_SIG_NO_MATCH;