From 4c6fd7ad4c3254accff9f50e8e81f1d1afe475a7 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 9 Aug 2012 16:59:49 +0200 Subject: [PATCH] Bug #510. Produce error if max-pending-packets is higher than 65534. --- src/suricata.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/suricata.c b/src/suricata.c index 29e715c1af..0ae3719452 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1326,6 +1326,13 @@ int main(int argc, char **argv) * back on a sane default. */ if (ConfGetInt("max-pending-packets", &max_pending_packets) != 1) max_pending_packets = DEFAULT_MAX_PENDING_PACKETS; + if (max_pending_packets >= 65535) { + SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, + "Maximum max-pending-packets setting is 65534. " + "Please check %s for errors", conf_filename); + exit(EXIT_FAILURE); + } + SCLogDebug("Max pending packets set to %"PRIiMAX, max_pending_packets); /* Pull the default packet size from the config, if not found fall -- 2.47.2