summaryrefslogtreecommitdiff
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2010-01-24 22:42:13 +0000
committerPaul Jakma <paul@quagga.net>2010-12-08 17:13:19 +0000
commitc363d3861b5384a31465a72ddc3b0f6ff007a95a (patch)
tree3fcbfc071dc2a376979ca6a80d06599a5b574047 /ospfd/ospfd.c
parent7eb5b47e54169ac0da40ed1a6760db5d5f915a4d (diff)
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
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index a7553e73..7db81cea 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -131,8 +131,8 @@ ospf_router_id_update (struct ospf *ospf)
ospf->external_origin = 0;
}
- OSPF_TIMER_ON (ospf->t_router_lsa_update,
- ospf_router_lsa_update_timer, OSPF_LSA_UPDATE_DELAY);
+ /* update router-lsa's for each area */
+ ospf_router_lsa_update (ospf);
/* update ospf_interface's */
for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
@@ -337,7 +337,7 @@ ospf_deferred_shutdown_check (struct ospf *ospf)
SET_FLAG (area->stub_router_state, OSPF_AREA_ADMIN_STUB_ROUTED);
if (!CHECK_FLAG (area->stub_router_state, OSPF_AREA_IS_STUB_ROUTED))
- ospf_router_lsa_timer_add (area);
+ ospf_router_lsa_update_area (area);
}
timeout = ospf->stub_router_shutdown_time;
}
@@ -473,7 +473,6 @@ ospf_finish_final (struct ospf *ospf)
/* Cancel all timers. */
OSPF_TIMER_OFF (ospf->t_external_lsa);
- OSPF_TIMER_OFF (ospf->t_router_lsa_update);
OSPF_TIMER_OFF (ospf->t_spf_calc);
OSPF_TIMER_OFF (ospf->t_ase_calc);
OSPF_TIMER_OFF (ospf->t_maxage);
@@ -631,7 +630,6 @@ ospf_area_free (struct ospf_area *area)
free (IMPORT_NAME (area));
/* Cancel timer. */
- OSPF_TIMER_OFF (area->t_router_lsa_self);
OSPF_TIMER_OFF (area->t_stub_router);
#ifdef HAVE_OPAQUE_LSA
OSPF_TIMER_OFF (area->t_opaque_lsa_self);
@@ -1041,7 +1039,7 @@ ospf_area_type_set (struct ospf_area *area, int type)
break;
}
- ospf_router_lsa_timer_add (area);
+ ospf_router_lsa_update_area (area);
ospf_schedule_abr_task (area->ospf);
}
@@ -1052,7 +1050,7 @@ ospf_area_shortcut_set (struct ospf *ospf, struct ospf_area *area, int mode)
return 0;
area->shortcut_configured = mode;
- ospf_router_lsa_timer_add (area);
+ ospf_router_lsa_update_area (area);
ospf_schedule_abr_task (ospf);
ospf_area_check_free (ospf, area->area_id);
@@ -1064,7 +1062,7 @@ int
ospf_area_shortcut_unset (struct ospf *ospf, struct ospf_area *area)
{
area->shortcut_configured = OSPF_SHORTCUT_DEFAULT;
- ospf_router_lsa_timer_add (area);
+ ospf_router_lsa_update_area (area);
ospf_area_check_free (ospf, area->area_id);
ospf_schedule_abr_task (ospf);