From: Guus Sliepen Date: Sat, 25 Feb 2012 22:03:09 +0000 (+0100) Subject: Go back to breadth first search for path finding. X-Git-Tag: release-1.1pre3~148 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=8b1ad6f76f821648079818f6ff018bbc33b9d9e9;p=tinc Go back to breadth first search for path finding. If 1.1.x nodes using Dijkstra's algorithm are mixed with 1.0.x nodes using BFS, then routing loops can occur. --- diff --git a/src/graph.c b/src/graph.c index 42157b0a..17252411 100644 --- a/src/graph.c +++ b/src/graph.c @@ -65,7 +65,7 @@ Please note that sorting on weight is already done by add_edge(). */ -void mst_kruskal(void) { +static void mst_kruskal(void) { splay_node_t *node, *next; edge_t *e; node_t *n; @@ -216,7 +216,7 @@ static void sssp_dijkstra(void) { Running time: O(E) */ -void sssp_bfs(void) { +static void sssp_bfs(void) { splay_node_t *node, *to; edge_t *e; node_t *n; @@ -369,7 +369,7 @@ static void check_reachability(void) { void graph(void) { subnet_cache_flush(); - sssp_dijkstra(); + sssp_bfs(); check_reachability(); mst_kruskal(); }