2004-04-08 Paul Jakma <paul@dishone.st>
* ospf_spf.h: Add backlink field to struct vertex
* ospf_spf.h: (ospf_vertex_new) initialise backlink
(ospf_lsa_has_link) return index of link back to
vertex V from candidate vertex W, or -1 if no link exists.
(ospf_spf_next) save backlink index for candidate vertex
* ospf_interface.c: (ospf_vl_set_params) Use the backlink index
to determine correct address for virtual-link peers. Fall back
to older "pick first link" method if no backlink index exists.
diff --git a/ospfd/ospf_spf.h b/ospfd/ospf_spf.h
index 7fe682e..7312000 100644
--- a/ospfd/ospf_spf.h
+++ b/ospfd/ospf_spf.h
@@ -33,6 +33,7 @@
struct in_addr id;
struct lsa_header *lsa;
u_int32_t distance;
+ int backlink; /* link index of back-link */
list child;
list nexthop;
};
@@ -44,7 +45,7 @@
struct vertex *parent;
};
-void ospf_spf_calculate_schedule ();
+void ospf_spf_calculate_schedule (struct ospf *);
void ospf_rtrs_free (struct route_table *);
/* void ospf_spf_calculate_timer_add (); */