Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relay circuitv2: relaymanager starts new relays without closing older ones #2091

Closed
Tracked by #2062
sukunrt opened this issue Feb 14, 2023 · 0 comments · Fixed by #2093
Closed
Tracked by #2062

relay circuitv2: relaymanager starts new relays without closing older ones #2091

sukunrt opened this issue Feb 14, 2023 · 0 comments · Fixed by #2093
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@sukunrt
Copy link
Member

sukunrt commented Feb 14, 2023

While debugging #2046 , we found out that autonat would emit events when the observed address has changed even though the node reachability hasn't changed.

I found out that the LocalProtocolsUpdated event was coming from RelayManager.reachabilityChanged which starts a new relay if the observed event is reachability.Public
https://github.com/libp2p/go-libp2p/blob/master/p2p/host/relaysvc/relay.go#L65-L85

This is incorrect. It should only start a new relay if the previous state was not public or at least close any previous running relays and then start a new one.

cc: @marten-seemann

@marten-seemann marten-seemann added the kind/bug A bug in existing code (including security flaws) label Feb 14, 2023
@marten-seemann marten-seemann mentioned this issue Feb 14, 2023
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants