Allocate stats with MAX_CPUS and check for NULL index to attempt to fix seg fault on issue #10.

This commit is contained in:
gamemann
2021-12-06 16:54:20 +00:00
parent 3ebb0a763b
commit 21b15badf6
2 changed files with 16 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
#define MAX_PCKT_LENGTH 65535
#define MAX_FILTERS 100
#define MAX_TRACK_IPS 100000
#define MAX_CPUS 256
#ifdef __BPF__
#define likely(x) __builtin_expect(!!(x), 1)