summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-09-08 13:45:02 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-09-08 13:45:02 +0200
commitbe862406627da3bd1facea9309b3f32e67422eab (patch)
treea1463c4feca6145d4a2e36b39c893a7253316b73 /proto/ospf/ospf.c
parentf9c799a00e705b1420b214628c2bb2a30bf491d9 (diff)
downloadbird-be862406627da3bd1facea9309b3f32e67422eab.tar
bird-be862406627da3bd1facea9309b3f32e67422eab.zip
Temporary OSPFv3 development commit.
Finally, it is working.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 438e9a5..dafb607 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -307,15 +307,29 @@ ospf_build_attrs(ea_list * next, struct linpool *pool, u32 m1, u32 m2,
void
schedule_net_lsa(struct ospf_iface *ifa)
{
+ struct proto *p = &ifa->oa->po->proto;
+
+ OSPF_TRACE(D_EVENTS, "Scheduling network-LSA origination for iface %s", ifa->iface->name);
ifa->orignet = 1;
}
+#ifdef OSPFv3
+void
+schedule_link_lsa(struct ospf_iface *ifa)
+{
+ struct proto *p = &ifa->oa->po->proto;
+
+ OSPF_TRACE(D_EVENTS, "Scheduling link-LSA origination for iface %s", ifa->iface->name);
+ ifa->origlink = 1;
+}
+#endif
+
void
schedule_rt_lsa(struct ospf_area *oa)
{
struct proto *p = &oa->po->proto;
- OSPF_TRACE(D_EVENTS, "Scheduling RT lsa origination for area %R.", oa->areaid);
+ OSPF_TRACE(D_EVENTS, "Scheduling router-LSA origination for area %R", oa->areaid);
oa->origrt = 1;
}
@@ -327,7 +341,7 @@ schedule_rtcalc(struct proto_ospf *po)
if (po->calcrt)
return;
- OSPF_TRACE(D_EVENTS, "Scheduling RT calculation.");
+ OSPF_TRACE(D_EVENTS, "Scheduling routing table calculation");
po->calcrt = 1;
}
@@ -353,6 +367,7 @@ area_disp(struct ospf_area *oa)
WALK_LIST(ifa, po->iface_list)
{
#ifdef OSPFv3
+ /* Link LSA should be originated before Network LSA */
if (ifa->origlink && (ifa->oa == oa))
update_link_lsa(ifa);
#endif
@@ -478,6 +493,7 @@ ospf_ifa_notify(struct proto *p, unsigned flags, struct ifa *a)
if (ifa->iface == a->iface)
{
schedule_rt_lsa(ifa->oa);
+ schedule_link_lsa(ifa);
return;
}
}