Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns memcap v0.3 #789

Merged
merged 9 commits into from Jan 21, 2014
Merged

dns memcap v0.3 #789

merged 9 commits into from Jan 21, 2014

Conversation

inliniac
Copy link
Contributor

Yaml layout changed. DNS had to be updated to retrievel value
for dns flood from the correct location in the config tree.
Add per state and global memcap option parsing.
Add memuse tracking and memcap checking to the DNS parsers. Memuse
is tracked globally and per flow (state).

Memcaps are also checked per flow and globally before memory allocs
are done.
To be able to register counters from AppLayerGetCtxThread, the
ThreadVars pointer needs to be available in it and thus in it's
callers:

- AppLayerGetCtxThread
- DecodeThreadVarsAlloc
- StreamTcpReassembleInitThreadCtx
Update AppLayerHandleUdp to take the ThreadVars pointer as an
argument in prepraration of handling counters in this function.
Register dns memory counters.
Keep track of memcap reached conditions, and increment counters for
those.
This patch updates the DNS counters from the main AppLayer entry
functions. Due to the limited scope of AppLayerThreadCtx some of
the logic had to be implemented in app-layer.c, where it doesn't
belong.
Raise event if state-memcap is reached for a flow.
@inliniac inliniac merged commit 657b83d into master Jan 21, 2014
@inliniac inliniac deleted the dev-dns-memcap-v0.3 branch January 21, 2014 15:23
This was referenced Jul 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants