diff options
author | Dinesh Dutt <ddutt@cumulusnetworks.com> | 2013-08-24 07:54:09 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2013-11-07 18:15:30 -0800 |
commit | 3810e06eebe14f75c66fb17a88574384573e95fa (patch) | |
tree | 0e7ba30d0b24d1ea874eb257b78fdeed2eaebf4c /ospf6d/ospf6_interface.c | |
parent | 8551e6dadce41fb87a61767af723cb25ae611a04 (diff) | |
download | quagga-3810e06eebe14f75c66fb17a88574384573e95fa.tar.bz2 quagga-3810e06eebe14f75c66fb17a88574384573e95fa.tar.xz |
ospf6d: schedule SPF to run on events rather than directly on each event.
OSPV3 SPF triggers on every SPF-able event instead of using timers the way
OSPFv2 does. This patch makes SPF be triggered/throttled similar to OSPFv2.
It adds a command to quagga identical to the OSPFv2 equivalent to configure
these timers.
Summary:
Signed-off-by: Dinesh Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
[DL: removed reference to oa->ts_spf for rebase]
[DL: killed timeval_subtract]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r-- | ospf6d/ospf6_interface.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index 467479b1..7c45fe46 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -75,12 +75,18 @@ ospf6_interface_lookup_by_ifindex (int ifindex) static void ospf6_interface_lsdb_hook (struct ospf6_lsa *lsa) { + struct ospf6_interface *oi; + + if (lsa == NULL) + return; + + oi = lsa->lsdb->data; switch (ntohs (lsa->header->type)) { case OSPF6_LSTYPE_LINK: - if (OSPF6_INTERFACE (lsa->lsdb->data)->state == OSPF6_INTERFACE_DR) - OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (OSPF6_INTERFACE (lsa->lsdb->data)); - ospf6_spf_schedule (OSPF6_INTERFACE (lsa->lsdb->data)->area); + if (oi->state == OSPF6_INTERFACE_DR) + OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (oi); + ospf6_spf_schedule (oi->area->ospf6); break; default: |