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
fix(swarm): Showcase impossibility of dialing self by ip. #5124
base: master
Are you sure you want to change the base?
Conversation
4d8337d
to
87dce36
Compare
This pull request has merge conflicts. Could you please resolve them @vnermolaev? 🙏 |
I am getting a failure with |
What is the actual error that is returned here? I think to correctly fix #4460, we should catch this case explicitly and not return on the kernel to fail dialing |
The error returned is SwarmEvent::OutgoingConnectionError {
peer_id,
// multiaddr,
error: DialError::Transport(errors),
..
} It is already the case that #4460 requests to disallow dialling self, which is already the case.
I believe the former is better because it already works and produces expected errors. In the latter case, imagine the list of addresses consists of only the localhost versions, which will be filtered out, then one shall receive an error stating that no addresses were present. Such an error is confusing and requires a log investigation. |
Description
This PR addresses issue #4460.
However, the issue described in #4460 is not actually an issue, and, as the update test showcases, errors were already raised when swarm tried to dial self.
The updated test adds
::1
and127.0.0.1
version of self.Change checklist
I do not believe there must be any changelog items as the code did not change at all.