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

p2p/nat: set refreshInterval #26322

Closed
wants to merge 1 commit into from
Closed

Conversation

dbadoy
Copy link
Contributor

@dbadoy dbadoy commented Dec 7, 2022

The process of refreshing the portmap is executed as a timer every lifetime, but it is not a refresh operation because the NAT mapping is deleted in the process of generating and transmitting the request packet. It's seems remapping. During this operation, there is a possibility that a node that was operating may not be able to communicate normally because another client preempts the port that was in use. PR is meant to prevent this.

@dbadoy dbadoy changed the title p2p/nat: set rereshInterval p2p/nat: set refreshInterval Dec 7, 2022
@dbadoy
Copy link
Contributor Author

dbadoy commented Dec 7, 2022

I just saw #21390. I'll close this.

@dbadoy dbadoy closed this Dec 7, 2022
@dbadoy
Copy link
Contributor Author

dbadoy commented Dec 7, 2022

Just note: According to RFC, The client SHOULD begin trying to renew the mapping halfway to expiry time, like DHCP. But renewal, expiration on lifetime does not work properly on some NAT devices(e.g. #21370 (comment)). Therefore, instead of keeping it through renewal, a new allocation method after expiration is used.

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

Successfully merging this pull request may close these issues.

1 participant