From d4ba869a355b8c460e1f9da84184476a0933196f Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Sun, 11 Sep 2011 15:55:42 +0530 Subject: [PATCH] fix - we need to set direction flags for reassembly pseudo packet. Also reset local flags for every flow that is force reassembled in ForQ --- src/flow.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/flow.c b/src/flow.c index 9dbf08f1ca..4c5ae82855 100644 --- a/src/flow.c +++ b/src/flow.c @@ -1387,8 +1387,8 @@ static inline void FlowForceReassemblyForQ(FlowQueue *q) { Flow *f; TcpSession *ssn; - int client_ok = 0; - int server_ok = 0; + int client_ok; + int server_ok; /* no locks needed, since the engine is virtually dead. * We are the kings here */ @@ -1406,6 +1406,9 @@ static inline void FlowForceReassemblyForQ(FlowQueue *q) Packet reassemble_p; memset(&reassemble_p, 0, sizeof(Packet)); + client_ok = 0; + server_ok = 0; + /* Get the tcp session for the flow */ ssn = (TcpSession *)f->protoctx; @@ -1428,6 +1431,7 @@ static inline void FlowForceReassemblyForQ(FlowQueue *q) ssn->client.seg_list_tail->payload_len); reassemble_p.flow = f; reassemble_p.flags |= PKT_PSEUDO_STREAM_END; + reassemble_p.flowflags = FLOW_PKT_TOCLIENT; StreamTcpReassembleHandleSegment(stream_pseudo_pkt_detect_TV, stt->ra_ctx, ssn, &ssn->server, &reassemble_p, NULL); @@ -1445,6 +1449,7 @@ static inline void FlowForceReassemblyForQ(FlowQueue *q) ssn->server.seg_list_tail->payload_len); reassemble_p.flow = f; reassemble_p.flags |= PKT_PSEUDO_STREAM_END; + reassemble_p.flowflags = FLOW_PKT_TOSERVER; StreamTcpReassembleHandleSegment(stream_pseudo_pkt_detect_TV, stt->ra_ctx, ssn, &ssn->client, &reassemble_p, NULL);