@ -176,7 +176,7 @@ static enum EngineMode g_engine_mode = ENGINE_MODE_UNKNOWN;
uint8_t host_mode = SURI_HOST_IS_SNIFFER_ONLY ;
/** Maximum packets to simultaneously process. */
intmax _t max_pending_packets ;
uint16 _t max_pending_packets ;
/** global indicating if detection is enabled */
int g_detect_disabled = 0 ;
@ -2426,16 +2426,19 @@ static int ConfigGetCaptureValue(SCInstance *suri)
{
/* Pull the max pending packets from the config, if not found fall
* 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 ( " Maximum max-pending-packets setting is 65534. "
intmax_t tmp_max_pending_packets ;
if ( ConfGetInt ( " max-pending-packets " , & tmp_max_pending_packets ) ! = 1 )
tmp_max_pending_packets = DEFAULT_MAX_PENDING_PACKETS ;
if ( tmp_max_pending_packets < 1 | | tmp_max_pending_packets > = UINT16_MAX ) {
SCLogError ( " Maximum max-pending-packets setting is 65534 and must be greater than 0. "
" Please check %s for errors " ,
suri - > conf_filename ) ;
return TM_ECODE_FAILED ;
} else {
max_pending_packets = ( uint16_t ) tmp_max_pending_packets ;
}
SCLogDebug ( " Max pending packets set to % " PRIiMAX , max_pending_packets ) ;
SCLogDebug ( " Max pending packets set to % " PRIu16 , max_pending_packets ) ;
/* Pull the default packet size from the config, if not found fall
* back on a sane default . */