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

Peer address of TCP connection #13

Open
huang-jl opened this issue Jun 18, 2022 · 0 comments
Open

Peer address of TCP connection #13

huang-jl opened this issue Jun 18, 2022 · 0 comments

Comments

@huang-jl
Copy link
Contributor

huang-jl commented Jun 18, 2022

Issue

For now, when an endpoint accepts a connection, it will wait for the peer to send the real peer address (i.e. binding address). Later the endpoint will save this real peer address instead of the socket's remote address:

https://github.com/madsys-dev/madsim/blob/5a7a858547cc350408ec9f78261062295c3fcca8/madsim/src/std/net/tcp.rs#L81-L99

However, for example, when two endpoints R1 and R2 want to connect to S, R1 and R2 may bind to the same address like 0.0.0.0:xxxx. In this situation, S cannot distinguishes R1 and R2's connection.

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

No branches or pull requests

1 participant