Handle packet rate limits, too
[flowspec-xdp] / xdp.c
diff --git a/xdp.c b/xdp.c
index 506d4224030168ff32f98032199bf144e6630ec0..fc8f2c3bff94b7d24954ccc34dc3fc598a41b148 100644 (file)
--- a/xdp.c
+++ b/xdp.c
@@ -172,7 +172,10 @@ struct {
 #ifdef RATE_CNT
 struct ratelimit {
        struct bpf_spin_lock lock;
-       int64_t sent_bytes;
+       union {
+               int64_t sent_bytes;
+               int64_t sent_packets;
+       } rate;
        int64_t sent_time;
 };
 struct {