flowvar: remove unused DETECT_VAR_TYPE_ALWAYS

pull/2559/head
Victor Julien 9 years ago
parent 71607c905a
commit f0af133c5f

@ -339,10 +339,9 @@ static int DetectFlowvarPostMatch(ThreadVars *tv,
return 1; return 1;
} }
/** \brief Handle flowvar candidate list in det_ctx: /** \brief Handle flowvar candidate list in det_ctx: clean up the list
* - clean up the list *
* - enforce storage for type ALWAYS (vars set from lua) * Only called from DetectVarProcessList() when varlist is not NULL.
* Only called from DetectFlowvarProcessList() when flowvarlist is not NULL .
*/ */
void DetectVarProcessListInternal(DetectVarList *fs, Flow *f, Packet *p) void DetectVarProcessListInternal(DetectVarList *fs, Flow *f, Packet *p)
{ {
@ -351,16 +350,10 @@ void DetectVarProcessListInternal(DetectVarList *fs, Flow *f, Packet *p)
do { do {
next = fs->next; next = fs->next;
if (fs->type == DETECT_VAR_TYPE_ALWAYS) { if (fs->key) {
SCLogDebug("adding to the flow %u:", fs->idx); SCFree(fs->key);
//PrintRawDataFp(stdout, fs->buffer, fs->len);
FlowVarAddStrNoLock(f, fs->idx, fs->buffer, fs->len);
/* memory at fs->buffer is now the responsibility of
* the flowvar code. */
} else {
SCFree(fs->buffer);
} }
SCFree(fs->buffer);
SCFree(fs); SCFree(fs);
fs = next; fs = next;
} while (fs != NULL); } while (fs != NULL);

@ -492,8 +492,6 @@ typedef struct DetectReplaceList_ {
/** only execute flowvar storage if rule matched */ /** only execute flowvar storage if rule matched */
#define DETECT_VAR_TYPE_FLOW_POSTMATCH 1 #define DETECT_VAR_TYPE_FLOW_POSTMATCH 1
#define DETECT_VAR_TYPE_PKT_POSTMATCH 2 #define DETECT_VAR_TYPE_PKT_POSTMATCH 2
/** execute flowvar storage even if rule doesn't match (for lua) */
#define DETECT_VAR_TYPE_ALWAYS 3
/** list for flowvar store candidates, to be stored from /** list for flowvar store candidates, to be stored from
* post-match function */ * post-match function */

Loading…
Cancel
Save