From: Victor Julien Date: Mon, 26 May 2014 10:40:50 +0000 (+0200) Subject: nflog: warn if buffer-size is larger than max-size X-Git-Tag: suricata-2.0.2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26c091537586002d64c77f59750cd37b2441e892;p=thirdparty%2Fsuricata.git nflog: warn if buffer-size is larger than max-size If buffer-size is larger than max size, give a warning and adjust buffer-size to max-size. --- diff --git a/src/runmode-nflog.c b/src/runmode-nflog.c index 15628f19a0..17725622b5 100644 --- a/src/runmode-nflog.c +++ b/src/runmode-nflog.c @@ -132,6 +132,12 @@ void *ParseNflogConfig(const char *group) return NULL; } + if (nflogconf->nlbufsiz > nflogconf->nlbufsiz_max) { + SCLogWarning(SC_ERR_INVALID_ARGUMENT, "buffer-size value larger " + "than max-size value, adjusting buffer-size"); + nflogconf->nlbufsiz = nflogconf->nlbufsiz_max; + } + boolval = ConfGetChildValueIntWithDefault(group_root, group_default, "qthreshold", &qthreshold);