diff --git a/plugins/pfring/runmode-pfring.c b/plugins/pfring/runmode-pfring.c index 6a37ca2ea2..ef2732aaf0 100644 --- a/plugins/pfring/runmode-pfring.c +++ b/plugins/pfring/runmode-pfring.c @@ -115,7 +115,7 @@ static void *OldParsePfringConfig(const char *iface) pfconf->threads = 1; } else { if (threadsstr != NULL) { - if (StringParseInt32(&pfconf->threads, 10, 0, threadsstr) < 0) { + if (StringParseUnt16(&pfconf->threads, 10, 0, threadsstr) < 0) { SCLogWarning("Invalid value for " "pfring.threads: '%s'. Resetting to 1.", threadsstr); @@ -396,7 +396,7 @@ static void *ParsePfringConfig(const char *iface) return pfconf; } -static int PfringConfigGetThreadsCount(void *conf) +static uint16_t PfringConfigGetThreadsCount(void *conf) { PfringIfaceConfig *pfp = (PfringIfaceConfig *)conf; return pfp->threads; diff --git a/plugins/pfring/source-pfring.h b/plugins/pfring/source-pfring.h index 6ec96113c6..2f5de25e7f 100644 --- a/plugins/pfring/source-pfring.h +++ b/plugins/pfring/source-pfring.h @@ -41,7 +41,7 @@ typedef struct PfringIfaceConfig_ { char iface[PFRING_IFACE_NAME_LENGTH]; /* number of threads */ - int threads; + uint16_t threads; const char *bpf_filter;