ospfd: Unify router and network LSA refresh logic with general refresher
* (general) Get rid of the router and network LSA specific refresh timers
and make the general refresher do this instead. Get rid of the twiddling
of timers for router/network LSA that was spread across the code.
This lays the foundations for future, general LSA refresh improvements,
such as making sequence rollover work, and having generic LSA delays.
* ospfd.h: (struct ospf) Bye bye to the router-lsa update timer thread
pointer.
(struct ospf_area) and to the router-lsa refresh timer.
* ospf_interface.h: Remove the network_lsa_self timer thread pointer
* ospf_lsa.h: (struct ospf_lsa) oi field should always be there, for benefit
of type-2/network LSA processing.
(ospf_{router,network}_lsa_{update_timer,timer_add}) no timers for these
more
(ospf_{router,network}_lsa_update) more generic functions to indicate that some
router/network LSAs need updating
(ospf_router_lsa_update_area) update router lsa in a particular area alone.
(ospf_{summary,summary_asbr,network}_lsa_refresh) replaced by the general
ospf_lsa_refresh function.
(ospf_lsa_refresh) general LSA refresh function
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 7e32195..7a75194 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -565,8 +565,7 @@
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("ospf_check_abr_status(): new router flags: %x",new_flags);
ospf->flags = new_flags;
- OSPF_TIMER_ON (ospf->t_router_lsa_update,
- ospf_router_lsa_update_timer, OSPF_LSA_UPDATE_DELAY);
+ ospf_router_lsa_update (ospf);
}
}
@@ -760,7 +759,7 @@
zlog_debug ("ospf_abr_announce_network_to_area(): "
"refreshing summary");
set_metric (old, cost);
- lsa = ospf_summary_lsa_refresh (area->ospf, old);
+ lsa = ospf_lsa_refresh (area->ospf, old);
if (!lsa)
{
@@ -1148,7 +1147,7 @@
if (old)
{
set_metric (old, cost);
- lsa = ospf_summary_asbr_lsa_refresh (area->ospf, old);
+ lsa = ospf_lsa_refresh (area->ospf, old);
}
else
lsa = ospf_summary_asbr_lsa_originate (p, cost, area);