Use MTU probes to regularly ping other nodes over UDP.

This keeps NAT mappings for UDP alive, and will also detect when a node is not
reachable via UDP anymore or if the path MTU is decreasing. Tinc will fall back
to TCP if the node has become unreachable.

If UDP communication is impossible, we stop sending probes, but we retry if it
changes its keys.

We also decouple the UDP and TCP ping mechanisms completely, to ensure tinc
properly detects failure of either method.
This commit is contained in:
Guus Sliepen 2009-10-11 18:57:58 +02:00
parent 927064e5fd
commit 92b8abc921
2 changed files with 40 additions and 14 deletions

View file

@ -225,7 +225,5 @@ bool receive_meta(connection_t *c) {
return false;
}
c->last_ping_time = now;
return true;
}