Skip to content

fix(relay): enforce per-peer reservation limit at boundary#6365

Open
failuresmith wants to merge 2 commits intolibp2p:masterfrom
failuresmith:codex/fix-relay-per-peer-reservation-boundary
Open

fix(relay): enforce per-peer reservation limit at boundary#6365
failuresmith wants to merge 2 commits intolibp2p:masterfrom
failuresmith:codex/fix-relay-per-peer-reservation-boundary

Conversation

@failuresmith
Copy link
Copy Markdown

Summary

  • change the per-peer reservation guard to reject at the configured boundary
  • add a regression test covering two connections that share the same PeerId

Root cause

The relay admission check used > instead of >= when evaluating max_reservations_per_peer, which allowed one extra reservation when a peer was already exactly at the configured limit.

Validation

  • cargo fmt --check
  • cargo test -p libp2p-relay

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