X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=flowspec-xdp;a=blobdiff_plain;f=xdp.c;h=e63bec379ee143672211c59c9bb4aaab19af9c2a;hp=62120d2ef52107511c5f4a4f245c666ef5d4dcb2;hb=109e2f9ca7608102bbb276296a2cf8389e22c5cb;hpb=81e2215518fa76a2dc0dc88105550bf26c86c27b diff --git a/xdp.c b/xdp.c index 62120d2..e63bec3 100644 --- a/xdp.c +++ b/xdp.c @@ -151,7 +151,7 @@ struct xdp_md { static const int XDP_PASS = 0; static const int XDP_DROP = 1; -static long drop_cnt_map[RULECNT + STATIC_RULE_CNT]; +static long drop_cnt_map[STATS_RULECNT + STATIC_RULE_CNT]; #define INCREMENT_MATCH(reason) { drop_cnt_map[reason] += 1; drop_cnt_map[reason] += data_end - pktdata; } #else /* TEST */ @@ -164,7 +164,7 @@ struct match_counter { }; struct { __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); - __uint(max_entries, RULECNT + STATIC_RULE_CNT); + __uint(max_entries, STATS_RULECNT + STATIC_RULE_CNT); __u32 *key; struct match_counter *value; } drop_cnt_map SEC(".maps");