summaryrefslogtreecommitdiff
path: root/ospfd/ospf_spf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_spf.c')
-rw-r--r--ospfd/ospf_spf.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 95668435..ca200222 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -678,6 +678,19 @@ ospf_nexthop_calculation (struct ospf_area *area, struct vertex *v,
}
}
}
+ /* NB: This code is non-trivial.
+ *
+ * E.g. it is not enough to know that V connects to the root. It is
+ * also important that the while above, looping through all links from
+ * W->V found at least one link, so that we know there is
+ * bi-directional connectivity between V and W. Otherwise, if we
+ * /always/ return here, but don't check that W->V exists then we
+ * we will prevent SPF from finding/using higher cost paths..
+ *
+ * See also bug #330, and also:
+ *
+ * http://blogs.sun.com/paulj/entry/the_difference_a_line_makes
+ */
if (added)
return added;
}
@@ -1164,12 +1177,6 @@ ospf_spf_calculate (struct ospf_area *area, struct route_table *new_table,
ospf_vertex_add_parent (v);
- /* Note that when there is a choice of vertices closest to the
- root, network vertices must be chosen before router vertices
- in order to necessarily find all equal-cost paths. */
- /* We don't do this at this moment, we should add the treatment
- above codes. -- kunihiro. */
-
/* RFC2328 16.1. (4). */
if (v->type == OSPF_VERTEX_ROUTER)
ospf_intra_add_router (new_rtrs, v, area);