app-layer-htp: add http_body_inline setting

pull/1559/head
Giuseppe Longo 10 years ago committed by Victor Julien
parent 80615f7d43
commit a459376d2e

@ -2468,6 +2468,21 @@ static void HTPConfigParseParameters(HTPCfgRec *cfg_prec, ConfNode *s,
exit(EXIT_FAILURE);
}
cfg_prec->randomize_range = range;
} else if (strcasecmp("http-body-inline", p->name) == 0) {
if (ConfValIsTrue(p->val)) {
cfg_prec->http_body_inline = 1;
} else if (ConfValIsFalse(p->val)) {
cfg_prec->http_body_inline = 0;
} else {
if (strcmp("auto", p->val) != 0) {
WarnInvalidConfEntry("http_body_inline", "%s", "auto");
}
if (EngineModeIsIPS()) {
cfg_prec->http_body_inline = 1;
} else {
cfg_prec->http_body_inline = 0;
}
}
} else {
SCLogWarning(SC_ERR_UNKNOWN_VALUE, "LIBHTP Ignoring unknown "
"default config: %s", p->name);

@ -157,6 +157,7 @@ typedef struct HTPCfgRec_ {
uint32_t response_inspect_window;
int randomize;
int randomize_range;
int http_body_inline;
} HTPCfgRec;
/** Struct used to hold chunks of a body on a request */

@ -1366,6 +1366,10 @@ app-layer:
request-body-inspect-window: 4kb
response-body-minimal-inspect-size: 32kb
response-body-inspect-window: 4kb
# auto will use http-body-inline mode in IPS mode, yes or no set it statically
http-body-inline: auto
# Take a random value for inspection sizes around the specified value.
# This lower the risk of some evasion technics but could lead
# detection change between runs. It is set to 'yes' by default.

Loading…
Cancel
Save