summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-12-02 12:21:32 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-12-02 12:21:32 +0000
commit7878a905f44b6ac10633e1b2d0a4bb5361083315 (patch)
tree9c302d3eb358f53cc463b52203ebe2fe599e6988 /usr.sbin
parentc529c4bf0ac017fa4bd8c197143b605579363b0a (diff)
Fixed version of r1.35, readd candidate to list in both cases so that the list
remains sorted. Tested and OK norby@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ospfd/rde_spf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c
index b442323b388..748c96df9f4 100644
--- a/usr.sbin/ospfd/rde_spf.c
+++ b/usr.sbin/ospfd/rde_spf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_spf.c,v 1.37 2005/11/14 11:48:05 norby Exp $ */
+/* $OpenBSD: rde_spf.c,v 1.38 2005/12/02 12:21:31 claudio Exp $ */
/*
* Copyright (c) 2005 Esben Norby <norby@openbsd.org>
@@ -172,14 +172,19 @@ spf_calc(struct area *area)
w->cost = d;
w->prev = v;
calc_next_hop(w, v);
+ /*
+ * need to readd to candidate list
+ * because the list is sorted
+ */
+ TAILQ_REMOVE(&cand_list, w, cand);
+ cand_list_add(w);
}
} else if (w->cost == LS_INFINITY && d < LS_INFINITY) {
w->cost = d;
-
- cand_list_add(w);
w->prev = v;
calc_next_hop(w, v);
+ cand_list_add(w);
}
}