Fix stateful inspection not always inspecting at stream end.

pull/278/head
Victor Julien 13 years ago
parent f59ce70c17
commit afb2d4eddf

@ -209,6 +209,9 @@ void AppLayerSetEOF(Flow *f)
parser_state_store->id_flags |= APP_LAYER_TRANSACTION_EOF;
parser_state_store->to_client.flags |= APP_LAYER_PARSER_EOF;
parser_state_store->to_server.flags |= APP_LAYER_PARSER_EOF;
/* increase version so we will inspect it one more time
* with the EOF flags now set */
parser_state_store->version++;
}
}

@ -1355,7 +1355,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
/* if applicable, continue stateful detection */
int state = DeStateFlowHasState(p->flow, flags, alversion);
if (state == 1) {
if (state == 1 || (flags & STREAM_EOF)) {
DeStateDetectContinueDetection(th_v, de_ctx, det_ctx, p->flow,
flags, alstate, alproto, alversion);
} else if (state == 2) {

Loading…
Cancel
Save