Merge branch 'thkr-1.1-ponyhof' of github.com:thorkill/tinc into thkr-1.1-ponyhof

This commit is contained in:
thorkill 2015-07-21 10:11:36 +02:00
commit 512c64980a
2 changed files with 3 additions and 3 deletions

View file

@ -149,6 +149,7 @@ static void sssp_bfs(void) {
myself->status.visited = true; myself->status.visited = true;
myself->status.indirect = false; myself->status.indirect = false;
myself->status.reachable = true;
myself->nexthop = myself; myself->nexthop = myself;
myself->prevedge = NULL; myself->prevedge = NULL;
myself->via = myself; myself->via = myself;
@ -205,7 +206,7 @@ static void sssp_bfs(void) {
e->to->options = e->options; e->to->options = e->options;
e->to->distance = n->distance + 1; 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); update_node_udp(e->to, &e->address);
list_insert_tail(todo_list, e->to); list_insert_tail(todo_list, e->to);

View file

@ -329,14 +329,13 @@ void regenerate_key(void) {
} }
void update_edge_weight(void) { void update_edge_weight(void) {
logger(DEBUG_STATUS, LOG_INFO, "Update edge weight");
for list_each(connection_t, c, connection_list) { for list_each(connection_t, c, connection_list) {
if (c->status.control || !c->edge) if (c->status.control || !c->edge)
continue; continue;
if (c->edge->avg_rtt && (c->edge->weight != c->edge->avg_rtt*10)) { if (c->edge->avg_rtt && (c->edge->weight != c->edge->avg_rtt*10)) {
logger(DEBUG_STATUS, LOG_INFO, "update_edge_weight(): %s -> %s (%d -> %d)", c->edge->from->name, logger(DEBUG_STATUS, LOG_INFO, "%s: %s -> %s (%d -> %d)", __FUNCTION__, c->edge->from->name,
c->edge->to->name, c->edge->to->name,
c->edge->weight, c->edge->weight,
c->edge->avg_rtt*10); c->edge->avg_rtt*10);