X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgraph.c;h=c0a5d0a60575c7fe52a6707fef939fce28dd3114;hb=7939ee12836bf2ef772f2a6a1e805ee0d64a8e70;hp=8f601c2170f7db497df4e375907f058b9c41ea25;hpb=bd451cfe1512fa69eac35a60dbe6df17bfc39154;p=tinc diff --git a/src/graph.c b/src/graph.c index 8f601c21..c0a5d0a6 100644 --- a/src/graph.c +++ b/src/graph.c @@ -241,6 +241,7 @@ static void check_reachability(void) { n->minmtu = 0; n->mtuprobes = 0; + timeout_del(&n->udp_ping_timeout); timeout_del(&n->mtutimeout); char *name; @@ -275,13 +276,6 @@ static void check_reachability(void) { update_node_udp(n, NULL); memset(&n->status, 0, sizeof n->status); n->options = 0; - } else if(n->connection) { - if(n->status.sptps) { - if(n->connection->outgoing) - send_req_key(n); - } else { - send_ans_key(n); - } } } @@ -292,7 +286,7 @@ static void check_reachability(void) { if (device_standby) { if (reachable_count == 0 && became_unreachable_count > 0) device_disable(); - else if (reachable_count == became_reachable_count) + else if (reachable_count > 0 && reachable_count == became_reachable_count) device_enable(); } }