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

transport-manager: Connections not properly rejected #267

Open
lexnv opened this issue Oct 21, 2024 · 0 comments
Open

transport-manager: Connections not properly rejected #267

lexnv opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lexnv
Copy link
Collaborator

lexnv commented Oct 21, 2024

Warning detected after running litep2p for several days:

WARN tokio-runtime-worker litep2p::transport-manager: peer ids do not match but transport was supposed to reject connection dialed_peer=PeerId("12D3KooWAnh5dx5RuPEaoghE6ZW4HB3KyUdS3FdM5Hs6E2hzQMM8") peer=PeerId("12D3KooWAynpgAaBddL4zoRjcSfwkt3jUcdZK6beecVYsHmLzkQT") endpoint=Dialer { address: "/ip4/195.201.243.172/tcp/30385/ws/p2p/12D3KooWAynpgAaBddL4zoRjcSfwkt3jUcdZK6beecVYsHmLzkQT", connection_id: ConnectionId(199889) }

if let Some(dialed_peer) = self.pending_connections.remove(&endpoint.connection_id()) {
if dialed_peer != peer {
tracing::warn!(
target: LOG_TARGET,
?dialed_peer,
?peer,
?endpoint,
"peer ids do not match but transport was supposed to reject connection"

Issue:

  • we have dialed a peer (A) on websocket connection
  • transport manager extracted a different peer (B) from the connected endpoint
  • individual transports should have rejected the connection and not propagate the event back to the transport manager

We might have a broken logic in connection ID assignment, or there is a problem at the transport layer

@lexnv lexnv added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant