logger(mesh, MESHLINK_INFO, "Too much time has elapsed since last UDP ping response from %s, stopping UDP communication", n->name);
n->status.udp_confirmed = false;
n->mtuprobes = 0;
logger(mesh, MESHLINK_INFO, "Too much time has elapsed since last UDP ping response from %s, stopping UDP communication", n->name);
n->status.udp_confirmed = false;
n->mtuprobes = 0;
}
static void send_udp_probe_reply(meshlink_handle_t *mesh, node_t *n, vpn_packet_t *packet, uint16_t len) {
}
static void send_udp_probe_reply(meshlink_handle_t *mesh, node_t *n, vpn_packet_t *packet, uint16_t len) {
// Reset the UDP ping timer.
timeout_del(&mesh->loop, &n->udp_ping_timeout);
// Reset the UDP ping timer.
timeout_del(&mesh->loop, &n->udp_ping_timeout);
- logger(mesh, MESHLINK_DEBUG, "try_udp(%s) %d %d\n", n->name, (int)elapsed.tv_sec, interval);
+ int interval = (n->status.udp_confirmed && n->udpprobes >= 0) ? 10 : 2;
if(elapsed.tv_sec >= interval) {
n->last_udp_probe_sent = mesh->loop.now;
send_udp_probe_packet(mesh, n, MIN_PROBE_SIZE);
if(elapsed.tv_sec >= interval) {
n->last_udp_probe_sent = mesh->loop.now;
send_udp_probe_packet(mesh, n, MIN_PROBE_SIZE);
if(!n->status.udp_confirmed && n->prevedge) {
n->status.broadcast = true;
send_udp_probe_packet(mesh, n, MIN_PROBE_SIZE);
if(!n->status.udp_confirmed && n->prevedge) {
n->status.broadcast = true;
send_udp_probe_packet(mesh, n, MIN_PROBE_SIZE);