Treat block time of 0 as indefinitely.

This commit is contained in:
Christian Deacon
2025-03-01 13:47:55 -05:00
parent 786b472287
commit de3739d027

View File

@@ -96,9 +96,9 @@ int xdp_prog_main(struct xdp_md *ctx)
blocked = bpf_map_lookup_elem(&map_block, &iph->saddr); blocked = bpf_map_lookup_elem(&map_block, &iph->saddr);
} }
if (blocked != NULL && *blocked > 0) if (blocked != NULL)
{ {
if (now > *blocked) if (*blocked > 0 && now > *blocked)
{ {
// Remove element from map. // Remove element from map.
if (iph6) if (iph6)