Skip to content

Rate-limit the packets accepted by the BPF filter? #13

@bengal

Description

@bengal

Currently, the BPF filter accepts all packets with the right IP/MAC, and those packets are passed to user space. Someone could cause a Denial of Service on the program using the library by sending a flood of ARP packets on the local network. This will keep the program busy and unable to do anything else.

Would it make sense to add a rate-limiting mechanism to the BPF program? It could be e.g. token bucket or even something simpler like storing the timestamp for each IP in a map, and dropping packets for the same IP if they are too close to the last timestamp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions