From 8c4cdfc37c6d36987863bce097f5aa253925b7ce Mon Sep 17 00:00:00 2001 From: thorkill Date: Mon, 20 Jul 2015 08:19:13 +0200 Subject: [PATCH] Prevent update_node_udp from changing our udp address Follup to 6dbcd4eb3d992977d86e1ec7fc5dd40c25af1eb6 - myself is always reachable - do not call update_node_udp if e->to == myself --- src/graph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph.c b/src/graph.c index 29f5e813..836661fd 100644 --- a/src/graph.c +++ b/src/graph.c @@ -149,6 +149,7 @@ static void sssp_bfs(void) { myself->status.visited = true; myself->status.indirect = false; + myself->status.reachable = true; myself->nexthop = myself; myself->prevedge = NULL; myself->via = myself; @@ -205,7 +206,7 @@ static void sssp_bfs(void) { e->to->options = e->options; e->to->distance = n->distance + 1; - if(!e->to->status.reachable || (e->to->address.sa.sa_family == AF_UNSPEC && e->address.sa.sa_family != AF_UNKNOWN)) + if(!e->to->status.reachable || (e->to != myself && e->to->address.sa.sa_family == AF_UNSPEC && e->address.sa.sa_family != AF_UNKNOWN)) update_node_udp(e->to, &e->address); list_insert_tail(todo_list, e->to);