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_nsm.c b/ospfd/ospf_nsm.c
index 1ab6ce3..279d2a0 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -711,7 +711,7 @@
LOOKUP(ospf_nsm_state_msg, old_state),
LOOKUP(ospf_nsm_state_msg, state));
- ospf_router_lsa_timer_add (oi->area);
+ ospf_router_lsa_update_area (oi->area);
if (oi->type == OSPF_IFTYPE_VIRTUALLINK)
{
@@ -719,7 +719,7 @@
ospf_area_lookup_by_area_id (oi->ospf, oi->vl_data->vl_area_id);
if (vl_area)
- ospf_router_lsa_timer_add (vl_area);
+ ospf_router_lsa_update_area (vl_area);
}
/* Originate network-LSA. */
@@ -730,10 +730,9 @@
ospf_lsa_flush_area (oi->network_lsa_self, oi->area);
ospf_lsa_unlock (&oi->network_lsa_self);
oi->network_lsa_self = NULL;
- OSPF_TIMER_OFF (oi->t_network_lsa_self);
}
else
- ospf_network_lsa_timer_add (oi);
+ ospf_network_lsa_update (oi);
}
}