defrag: really use 'max-frags' variable.

The 'max-frags' variable was not used and the 'trackers' variable was
not documented. This patch fixes the two issues.
pull/27/head
Eric Leblond 13 years ago
parent 6480cd1b9c
commit b1b4cd2729

@ -55,6 +55,7 @@
#endif
#define DEFAULT_DEFRAG_HASH_SIZE 0xffff
#define DEFAULT_DEFRAG_POOL_SIZE 0xffff
/**
* Default timeout (in seconds) before a defragmentation tracker will
@ -449,7 +450,10 @@ DefragContextNew(void)
}
/* Initialize the pool of frags. */
int frag_pool_size = 0xffff;
int frag_pool_size;
if (!ConfGetInt("defrag.max-frags", &frag_pool_size)) {
frag_pool_size = DEFAULT_DEFRAG_POOL_SIZE;
}
int frag_pool_prealloc = frag_pool_size / 4;
dc->frag_pool = PoolInit(frag_pool_size, frag_pool_prealloc,
DefragFragNew, dc, DefragFragFree);

@ -430,7 +430,8 @@ pattern-matcher:
# Defrag settings:
defrag:
max-frags: 65535
trackers: 65535 # number of defragmented flows to follow
max-frags: 65535 # number of fragments per-flow
prealloc: yes
timeout: 60

Loading…
Cancel
Save