ipfw: clean up decode thread local storage

Clean up the thread local data the decode portion of ipfw uses.

Bug #978
pull/914/merge
Victor Julien 12 years ago
parent 10c791c937
commit 8c16fede08

@ -139,6 +139,7 @@ void VerdictIPFWThreadExitStats(ThreadVars *, void *);
TmEcode VerdictIPFWThreadDeinit(ThreadVars *, void *);
TmEcode DecodeIPFWThreadInit(ThreadVars *, void *, void **);
TmEcode DecodeIPFWThreadDeinit(ThreadVars *tv, void *data);
TmEcode DecodeIPFW(ThreadVars *, Packet *, void *, PacketQueue *, PacketQueue *);
/**
@ -185,7 +186,7 @@ void TmModuleDecodeIPFWRegister (void) {
tmm_modules[TMM_DECODEIPFW].ThreadInit = DecodeIPFWThreadInit;
tmm_modules[TMM_DECODEIPFW].Func = DecodeIPFW;
tmm_modules[TMM_DECODEIPFW].ThreadExitPrintStats = NULL;
tmm_modules[TMM_DECODEIPFW].ThreadDeinit = NULL;
tmm_modules[TMM_DECODEIPFW].ThreadDeinit = DecodeIPFWThreadDeinit;
tmm_modules[TMM_DECODEIPFW].RegisterTests = NULL;
tmm_modules[TMM_DECODEIPFW].flags = TM_FLAG_DECODE_TM;
}
@ -498,6 +499,13 @@ TmEcode DecodeIPFWThreadInit(ThreadVars *tv, void *initdata, void **data)
SCReturnInt(TM_ECODE_OK);
}
TmEcode DecodeIPFWThreadDeinit(ThreadVars *tv, void *data)
{
if (data != NULL)
DecodeThreadVarsFree(data);
SCReturnInt(TM_ECODE_OK);
}
/**
* \brief This function sets the Verdict and processes the packet
*

Loading…
Cancel
Save