From 0669c133ef0150e9772711588651c1c4d8e45267 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 18 Jul 2020 14:23:56 +0200 Subject: [PATCH] Send a PING packet on a meta-connection if a UDP ping failed. If we lost a UDP ping packet, it might mean the node is down. We need to confirm that with a PING on the meta-connection. --- src/pmtu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pmtu.c b/src/pmtu.c index 4073825c..d91919ee 100644 --- a/src/pmtu.c +++ b/src/pmtu.c @@ -93,6 +93,13 @@ static void udp_probe_timeout_handler(event_loop_t *loop, void *data) { n->mtuprobes = 0; n->minmtu = 0; n->maxmtu = MTU; + + // If we also have a meta-connection to this node, send a PING on it as well + connection_t *c = n->connection; + + if(c && !c->status.pinged) { + send_ping(mesh, c); + } } static void send_udp_probe_reply(meshlink_handle_t *mesh, node_t *n, vpn_packet_t *packet, uint16_t len) { -- 2.39.5