diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-05-27 00:50:51 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-05-27 00:50:51 +0000 |
commit | 1b5dc1fadef4cb61991834f7aeadfb8642b45056 (patch) | |
tree | 203da50a7a58de58f4ba790c67d5f938d54d2e23 /usr.sbin/ospfd/rde_spf.c | |
parent | e2ff833e9c71fe2482a46beea694de665ba90eac (diff) |
Fix nexthop calculation by setting w->prev before calling calc_next_hop().
OK norby@
Diffstat (limited to 'usr.sbin/ospfd/rde_spf.c')
-rw-r--r-- | usr.sbin/ospfd/rde_spf.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c index dfdbed29d30..0fd657920c2 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.21 2005/05/26 23:31:04 norby Exp $ */ +/* $OpenBSD: rde_spf.c,v 1.22 2005/05/27 00:50:50 claudio Exp $ */ /* * Copyright (c) 2005 Esben Norby <norby@openbsd.org> @@ -167,16 +167,12 @@ spf_calc(struct area *area) if (d > w->cost) continue; - if (d == w->cost) { - calc_next_hop(w, v); - } - if (d < w->cost) { - calc_next_hop(w, v); - w->cost = d; w->prev = v; } + + calc_next_hop(w, v); } else { if (w->cost == LS_INFINITY) { w->cost = 0; |