From 8b1ad6f76f821648079818f6ff018bbc33b9d9e9 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 25 Feb 2012 23:03:09 +0100 Subject: [PATCH] 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. --- src/graph.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); } -- 2.39.5