/* If applicable, raise the minimum supported PMTU */
- try_fix_mtu(mesh, n);
-
if(n->minmtu < len) {
n->minmtu = len;
update_node_pmtu(mesh, n);
}
+
+ try_fix_mtu(mesh, n);
}
static void send_udp_probe_packet(meshlink_handle_t *mesh, node_t *n, int len) {
n->last_mtu_probe_sent = mesh->loop.now;
- try_fix_mtu(mesh, n);
-
if(n->mtuprobes < -3) {
/* We lost three PMTU probes, restart discovery */
logger(mesh, MESHLINK_INFO, "Decrease in PMTU to %s detected, restarting PMTU discovery", n->name);
send_udp_probe_packet(mesh, n, len);
n->mtuprobes++;
}
+
+ try_fix_mtu(mesh, n);
}
/* Keep the connection to the given node alive.