Skip to content

Add adaptive advert flood rate limiter to repeater#2544

Closed
ViezeVingertjes wants to merge 1 commit into
meshcore-dev:devfrom
ViezeVingertjes:advert-flood-protection
Closed

Add adaptive advert flood rate limiter to repeater#2544
ViezeVingertjes wants to merge 1 commit into
meshcore-dev:devfrom
ViezeVingertjes:advert-flood-protection

Conversation

@ViezeVingertjes
Copy link
Copy Markdown
Contributor

Adds an adaptive rate limiter on advert forwarding so one node cannot flood the mesh with bogus or abusive adverts. Bursts are still allowed when traffic is normal; the cap tightens when someone tries to hammer fake adverts.

That max rises and falls with recent traffic so normal use still gets through, but floods hit the cap fast and the rest is dropped until the next window.

Kept CLI changes minimal, on by default for happy neighbors.
get advert.ratelimit
set advert.ratelimit {on/off}

Context:
Most (intentional) abuse we had so far was spamming fake adverts, as it's one of the easiest things one (claude) can make apparantly. I tried to keep it as small/simple as possible, while still putting a brake on it, so it doesnt flood further into the mesh.

The EWMA config could be added to CLI perhaps as future improvement, with perhaps some kind of stats/status command, but left that out of scope for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant