Bug #510. Produce error if max-pending-packets is higher than 65534.

remotes/origin/master
Victor Julien 13 years ago
parent 6841171882
commit 4c6fd7ad4c

@ -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

Loading…
Cancel
Save