X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fgraph.c;h=7288f74bf4ebc8b0c4293cb638e77e15ae081511;hb=d15099e0029578bfd24d6b464b941f4693280001;hp=4f2ea498c2c7d70abb33a1f75f568a46b2055d64;hpb=5dde6461a321ee47b06e33f8203f2acf00a31a51;p=tinc diff --git a/src/graph.c b/src/graph.c index 4f2ea498..7288f74b 100644 --- a/src/graph.c +++ b/src/graph.c @@ -73,8 +73,6 @@ void mst_kruskal(void) { int safe_edges = 0; bool skipped; - cp(); - /* Clear MST status on connections */ for(node = connection_tree->head; node; node = node->next) { @@ -159,8 +157,6 @@ void sssp_bfs(void) { char *envp[7]; int i; - cp(); - todo_list = list_alloc(NULL); /* Clear visited status on nodes */ @@ -245,17 +241,17 @@ void sssp_bfs(void) { n->status.reachable = !n->status.reachable; if(n->status.reachable) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became reachable"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Node %s (%s) became reachable", n->name, n->hostname); } else { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became unreachable"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Node %s (%s) became unreachable", n->name, n->hostname); } /* TODO: only clear status.validkey if node is unreachable? */ n->status.validkey = false; - n->status.waitingforkey = false; + n->last_req_key = 0; n->maxmtu = MTU; n->minmtu = 0; @@ -290,6 +286,9 @@ void sssp_bfs(void) { free(envp[i]); subnet_update(n, NULL, n->status.reachable); + + if(!n->status.reachable) + update_node_udp(n, NULL); } } }