-
Notifications
You must be signed in to change notification settings - Fork 286
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
Send a keep alive signal every second to keep UDP tunnels from collapsin... #45
base: 1.1
Are you sure you want to change the base?
Conversation
…sing Some routes might drop UDP tunnels through NAT firewalls after a very short time frame. This leads to data being sent to the corresponding port being lost. To prevent this every second a small mtu probe packet is sent in order to keep the tunnel open and working. This does not eliminate the possibility of packet loss due to eager routers clearing their tables, but reduces the packet loss significantly.
This state machine replaces the rather complex and hard to mainain code from before. Through this preparation step tinc can be easily extended to implement a keepalive signal.
I see you're trying to improve the MTU discovery state machine in your patch, which is indeed welcome, but I think there's an even better way to approach this. When we get down to it, we can observe that the MTU probing code has two responsibilities: (1) ensure that the UDP tunnel is usable for minmtu-sized packets, and (2) try to increase minmtu (by sending probes larger than minmtu). Currently these two responsibilities are intermingled in the same MTU probing code, but in my opinion, they don't need to be. It should be perfectly fine to have "UDP tunnel testing and keepalive" and "MTU probing" be handled by two separate and relatively independent pieces of code, which would make the whole thing clearer and would end up removing (or at least greatly simplifying) the state machine that you are trying to improve in your patch. I'm currently trying to code a patch that implements the approach I'm suggesting. |
Hi Etienne, Am 28.12.2014 um 13:07 schrieb Etienne Dechamps:
that sounds like a resonable idea. It took me a while understanding the Cheers |
I've filed #61. As you can imagine, it goes in a completely different direction compared to your pull request. Unfortunately, sending keepalives was not part of my motivations when writing #61 - in fact, it probably makes it worse in that regard. That said, if you set |
So should this be addressed further, or closed as non-relevant anymore? |
...g
Some routes might drop UDP tunnels through NAT firewalls after a very
short time frame. This leads to data being sent to the corresponding port
being lost. To prevent this every second a small mtu probe packet is sent
in order to keep the tunnel open and working. This does not eliminate the
possibility of packet loss due to eager routers clearing their tables, but
reduces the packet loss significantly.