* 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