- if(debug_lvl >= DEBUG_TRAFFIC)
- if(n->status.reachable)
- syslog(LOG_DEBUG, _("Node %s (%s) became reachable"),
- n->name, n->hostname);
- else
- syslog(LOG_DEBUG, _("Node %s (%s) became unreachable"),
- n->name, n->hostname);
-
- n->status.validkey = 0;
- n->status.waitingforkey = 0;
-
- asprintf(&envp[0], "NETNAME=%s", netname ? : "");
- asprintf(&envp[1], "DEVICE=%s", device ? : "");
- asprintf(&envp[2], "INTERFACE=%s", interface ? : "");
- asprintf(&envp[3], "NODE=%s", n->name);
+ if(experimental && OPTION_VERSION(n->options) >= 2)
+ n->status.sptps = true;
+
+ /* TODO: only clear status.validkey if node is unreachable? */
+
+ n->status.validkey = false;
+ if(n->status.sptps) {
+ sptps_stop(&n->sptps);
+ n->status.waitingforkey = false;
+ }
+ n->last_req_key = 0;
+
+ n->status.udp_confirmed = false;
+ n->maxmtu = MTU;
+ n->minmtu = 0;
+ n->mtuprobes = 0;
+
+ timeout_del(&n->mtutimeout);
+
+ char *name;
+ char *address;
+ char *port;
+ char *envp[7];
+
+ xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
+ xasprintf(&envp[1], "DEVICE=%s", device ? : "");
+ xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
+ xasprintf(&envp[3], "NODE=%s", n->name);