X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fgraph.c;h=2fc3b744c4e13fde81ed1d583f6d3b70df304628;hp=f6ce90dea8605f5af9995e5e73574cc67ab82987;hb=2077451e07f93edc520cf5bc31815624a2b03fdd;hpb=39fe3b445c2f20b325ee492dd1845877777b25c8 diff --git a/src/graph.c b/src/graph.c index f6ce90de..2fc3b744 100644 --- a/src/graph.c +++ b/src/graph.c @@ -1,7 +1,7 @@ /* graph.c -- graph algorithms - Copyright (C) 2001-2004 Guus Sliepen , - 2001-2004 Ivo Timmermans + Copyright (C) 2001-2006 Guus Sliepen , + 2001-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -226,7 +226,9 @@ void sssp_bfs(void) free(e->to->hostname); e->to->hostname = sockaddr2hostname(&e->to->address); - avl_insert_node(node_udp_tree, node); + + if(node) + avl_insert_node(node_udp_tree, node); if(e->to->options & OPTION_PMTU_DISCOVERY) { e->to->mtuprobes = 0; @@ -281,6 +283,8 @@ void sssp_bfs(void) asprintf(&envp[5], "REMOTEPORT=%s", port); envp[6] = NULL; + execute_script(n->status.reachable ? "host-up" : "host-down", envp); + asprintf(&name, n->status.reachable ? "hosts/%s-up" : "hosts/%s-down", n->name);