-
Notifications
You must be signed in to change notification settings - Fork 950
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
Autonat doesn't expire addresses #4863
Comments
Yes, good catch! Out of curiosity, why is your node continuously changing its address? Either way, this should be fixed. |
My node has static IP and doesn't change address. In fact IP address is always correct, it is port that varies. I also recall seeing in code comments about ephemeral TCP ports of outgoing connections being handled carefully, my current suspicion is that something like that is not taken into consideration for UDP/QUIC, which we use as primary transport now, but I didn't look into it very closely yet. |
I looked into it a bit and it is tricky to do without negative side-effects. The thing is that when we get error response from a peer, we would have to mark all external addresses as expired, which seems too damaging in case it is an adversarial response. I guess this is another thing that'll have to wait for Antonat v2? |
@umgefahren is this still relevant? |
As it stands, we don't expire addresses. This is connected to the issue of IPv4 and IPv6. Very basically: It's way more difficult to correctly state that an address is unreachable then to say that it's reachable. The goal of the version we shipped was to avoid false positives. However this can be shipped as a future improvement of the protocol. |
I noticed that in our network we have many peers that think their local addresses are using unreachable ports, which looks something like this:
As you can see many ports that are different from default port
30533
and are unreachable. I didn't understand why though, but now I think I do:Here node discovered external address candidate with
Identify
, then confirmed withAutonat
,Swarm
then capturesToSwarm::ExternalAddrConfirmed
and doesself.add_external_address()
.However, when
Autonat
notices that address is no longer reachable it doesn't fireToSwarm::ExternalAddrExpired
and previously added external address is not removed, so these invalid addresses keep piling up. At least that is my understanding right now.I believe
Autonat
should start firingToSwarm::ExternalAddrExpired
to do proper cleanup and close the loop here.The text was updated successfully, but these errors were encountered: