+ bool udp_confirmed = n->status.udp_confirmed;
+ n->status.udp_confirmed = true;
+ send_udppacket(mesh, n, packet);
+ n->status.udp_confirmed = udp_confirmed;
+ } else {
+ /* It's a valid reply: now we know bidirectional communication
+ is possible using the address and socket that the reply
+ packet used. */
+
+ if(!n->status.udp_confirmed) {
+ char *address, *port;
+ sockaddr2str(&n->address, &address, &port);
+ send_request(mesh, n->nexthop->connection, NULL, "%d %s %s . -1 -1 -1 0 %s %s", ANS_KEY, n->name, n->name, address, port);
+ free(address);
+ free(port);
+ n->status.udp_confirmed = true;
+ }
+
+ /* If we haven't established the PMTU yet, restart the discovery process. */
+
+ if(n->mtuprobes > 30) {
+ if(len == n->maxmtu + 8) {
+ logger(mesh, MESHLINK_INFO, "Increase in PMTU to %s detected, restarting PMTU discovery", n->name);
+ n->maxmtu = MTU;
+ n->mtuprobes = 10;
+ return;
+ }
+
+ if(n->minmtu) {
+ n->mtuprobes = 30;
+ } else {
+ n->mtuprobes = 1;
+ }
+ }