From 26c091537586002d64c77f59750cd37b2441e892 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 26 May 2014 12:40:50 +0200 Subject: [PATCH] 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. --- src/runmode-nflog.c | 6 ++++++ 1 file changed, 6 insertions(+) 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);