updates to http tx id vars. FFR now flags the app layer session for EOF when creating a pseudo packet for a flow

remotes/origin/master-1.1.x
Anoop Saldanha 14 years ago committed by Victor Julien
parent 67be07bf15
commit b406af451b

@ -787,7 +787,6 @@ static int HTPCallbackRequest(htp_connp_t *connp) {
SCReturnInt(HOOK_ERROR); SCReturnInt(HOOK_ERROR);
} }
hstate->transaction_cnt++;
SCLogDebug("transaction_cnt %"PRIu16", list_size %"PRIuMAX, SCLogDebug("transaction_cnt %"PRIu16", list_size %"PRIuMAX,
hstate->transaction_cnt, hstate->transaction_cnt,
(uintmax_t)list_size(hstate->connp->conn->transactions)); (uintmax_t)list_size(hstate->connp->conn->transactions));
@ -811,6 +810,9 @@ static int HTPCallbackResponse(htp_connp_t *connp) {
SCReturnInt(HOOK_ERROR); SCReturnInt(HOOK_ERROR);
} }
/* we have one whole transaction now */
hstate->transaction_cnt++;
/* Unset the body inspection (if any) */ /* Unset the body inspection (if any) */
hstate->flags &=~ HTP_FLAG_NEW_BODY_SET; hstate->flags &=~ HTP_FLAG_NEW_BODY_SET;

@ -56,7 +56,7 @@
#include "util-debug.h" #include "util-debug.h"
static uint16_t app_layer_sid = 0; uint16_t app_layer_sid = 0;
static AppLayerProto al_proto_table[ALPROTO_MAX]; /**< Application layer protocol static AppLayerProto al_proto_table[ALPROTO_MAX]; /**< Application layer protocol
table mapped to their table mapped to their
corresponding parsers */ corresponding parsers */

@ -211,6 +211,7 @@ AppLayerProbingParserInfo *AppLayerGetProbingParserInfo(AppLayerProbingParserInf
return NULL; return NULL;
} }
extern uint16_t app_layer_sid;
struct AlpProtoDetectCtx_; struct AlpProtoDetectCtx_;

@ -214,6 +214,12 @@ static inline Packet *FlowForceReassemblyPseudoPacketSetup(Packet *p,
memset(&p->ts, 0, sizeof(struct timeval)); memset(&p->ts, 0, sizeof(struct timeval));
TimeGet(&p->ts); TimeGet(&p->ts);
AppLayerParserStateStore *parser_state_store =
(AppLayerParserStateStore *)f->aldata[app_layer_sid];
if (parser_state_store != NULL) {
parser_state_store->id_flags |= APP_LAYER_TRANSACTION_EOF;
}
return p; return p;
} }

Loading…
Cancel
Save