cleanup flowtimeout threadvars retrieval +

throw back pseudo pkt back to packetpool inside flow timeout.
pull/237/head
Anoop Saldanha 12 years ago committed by Victor Julien
parent abecef5d82
commit b22a0cffbb

@ -537,6 +537,7 @@ static inline void FlowForceReassemblyForHash(void)
StreamTcpReassembleHandleSegment(stream_pseudo_pkt_stream_TV,
stt->ra_ctx, ssn, &ssn->server,
reassemble_p, NULL);
FlowDeReference(&reassemble_p->flow);
if (StreamTcpReassembleProcessAppLayer(stt->ra_ctx) < 0) {
SCLogDebug("shutdown flow timeout "
"StreamTcpReassembleProcessAppLayer() erroring "
@ -554,6 +555,7 @@ static inline void FlowForceReassemblyForHash(void)
StreamTcpReassembleHandleSegment(stream_pseudo_pkt_stream_TV,
stt->ra_ctx, ssn, &ssn->client,
reassemble_p, NULL);
FlowDeReference(&reassemble_p->flow);
if (StreamTcpReassembleProcessAppLayer(stt->ra_ctx) < 0) {
SCLogDebug("shutdown flow timeout "
"StreamTcpReassembleProcessAppLayer() erroring "
@ -597,6 +599,8 @@ static inline void FlowForceReassemblyForHash(void)
if (stream_pseudo_pkt_detect_TV != NULL) {
stream_pseudo_pkt_detect_TV->
tmqh_out(stream_pseudo_pkt_detect_TV, p);
} else {
TmqhOutputPacketpool(NULL, p);
}
}
} /* if (ssn->client.seg_list != NULL) */
@ -628,6 +632,8 @@ static inline void FlowForceReassemblyForHash(void)
if (stream_pseudo_pkt_detect_TV != NULL) {
stream_pseudo_pkt_detect_TV->
tmqh_out(stream_pseudo_pkt_detect_TV, p);
} else {
TmqhOutputPacketpool(NULL, p);
}
}
} /* if (ssn->server.seg_list != NULL) */
@ -727,7 +733,7 @@ void FlowForceReassemblySetup(void)
if (stream_pseudo_pkt_detect_TV->tm_slots == stream_pseudo_pkt_detect_tm_slot) {
stream_pseudo_pkt_detect_prev_TV = stream_pseudo_pkt_detect_TV->prev;
}
if (stream_pseudo_pkt_detect_TV->next == NULL) {
if (strcasecmp(stream_pseudo_pkt_detect_TV->outqh_name, "packetpool") == 0) {
stream_pseudo_pkt_detect_TV = NULL;
}

@ -474,6 +474,7 @@ void FlowShutdown(void)
for (u = 0; u < flow_config.hash_size; u++) {
Flow *f = flow_hash[u].head;
while (f) {
BUG_ON(SC_ATOMIC_GET(f->use_cnt) != 0);
Flow *n = f->hnext;
uint8_t proto_map = FlowGetProtoMapping(f->proto);
FlowClearMemory(f, proto_map);

Loading…
Cancel
Save