]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes bug that caused losing of some routes.
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 11 Aug 2009 08:54:50 +0000 (10:54 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 11 Aug 2009 08:54:50 +0000 (10:54 +0200)
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.

nest/rt-table.c

index fb2feacaf411690b7247d4dd204bc2d8a2a5f482..72138362ffeeca8477cc4f9c1be677fbfdee5646 100644 (file)
@@ -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))