summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-08-11 10:54:50 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-08-11 10:54:50 +0200
commit024e633c16cf21ae94d7e023e057e59080f92175 (patch)
tree94016f64ff1779dd02c838b784db3ab120452099 /nest
parente75d3c74a8f665a6e7dc0cc743a68e980e7c10da (diff)
downloadbird-024e633c16cf21ae94d7e023e057e59080f92175.tar
bird-024e633c16cf21ae94d7e023e057e59080f92175.zip
Fixes bug that caused losing of some routes.
When update changes preferred route in such a way that it ceased to be preferred, the new route was linked to wrong place and lost.
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index fb2feac..7213836 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -464,8 +464,8 @@ rte_recalculate(rtable *table, net *net, struct proto *p, struct proto *src, rte
}
if (new) /* Link in the new non-optimal route */
{
- new->next = old_best->next;
- old_best->next = new;
+ new->next = net->routes->next;
+ net->routes->next = new;
rte_trace_in(D_ROUTES, p, new, "added");
}
else if (old && (p->debug & D_ROUTES))