summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-05-05 15:27:35 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-05-05 15:27:35 +0000
commit5d49e4c1e9d6e5d0153b147900378828c3ef5744 (patch)
tree216e1ef9b98b2fa2b6f485c94ec1aa98751450f8
parent630cb3246f892e0da65fbf473c882890e425c62d (diff)
Fix a stupid typo in the #if 0 block in spf_calc() and start using that code
block. The idea is to ignore nodes that are already part of the SPF tree as soon as possible. OK norby@
-rw-r--r--usr.sbin/ospfd/rde_spf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c
index cb5b090ac95..632a2d6e3e9 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.9 2005/03/23 20:15:50 claudio Exp $ */
+/* $OpenBSD: rde_spf.c,v 1.10 2005/05/05 15:27:34 claudio Exp $ */
/*
* Copyright (c) 2005 Esben Norby <norby@openbsd.org>
@@ -170,12 +170,10 @@ spf_calc(struct area *area)
log_debug("spf_calc: w has no link to v");
continue;
}
-#if 0
- if ((w->cost != LS_INFINITY) && (v->prev != NULL)) {
+ if (w->cost != LS_INFINITY && w->prev != NULL) {
log_debug("spf_calc: w already in SPF tree");
continue;
}
-#endif
if (v->type == LSA_TYPE_ROUTER)
d = v->cost + ntohs(rtr_link->metric);
else