From: Guus Sliepen Date: Tue, 8 Dec 2009 22:18:37 +0000 (+0000) Subject: Forget addresses of unreachable nodes. X-Git-Tag: import-tinc-1.1~574^2 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=369fe1ab1cbfc3f8305de1faab2e30157378b044;p=meshlink Forget addresses of unreachable nodes. We clear the cached address used for UDP connections when a node becomes unreachable. This also prevents host-up scripts from passing the old, cached address from when the host becomes reachable again from a different address. --- diff --git a/src/graph.c b/src/graph.c index 148f23c4..f5aff5bf 100644 --- a/src/graph.c +++ b/src/graph.c @@ -286,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); } } }