From 6f7bbc0cec557e3f87a83c7481f92de68485cdb9 Mon Sep 17 00:00:00 2001 From: Manoj Naragund Date: Mon, 21 Nov 2022 02:32:53 -0800 Subject: ospfd: Datastructure changes for OSPFv2 Flood reduction. Description: Code changes involve following things. 1. an additional structure containing flood reduction related info per area. 2. a knob variable in the ospf structure for enabling/disabling the feature. 3. initialization of above mentioned variables. Signed-off-by: Manoj Naragund --- ospfd/ospfd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ospfd/ospfd.c') diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 023dc32a7..b70f3ebdd 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -467,6 +467,8 @@ static struct ospf *ospf_new(unsigned short instance, const char *name) */ ospf_gr_nvm_read(new); + new->fr_configured = false; + return new; } @@ -817,6 +819,7 @@ static void ospf_finish_final(struct ospf *ospf) THREAD_OFF(ospf->t_maxage); THREAD_OFF(ospf->t_maxage_walker); THREAD_OFF(ospf->t_abr_task); + THREAD_OFF(ospf->t_abr_fr); THREAD_OFF(ospf->t_asbr_check); THREAD_OFF(ospf->t_asbr_nssa_redist_update); THREAD_OFF(ospf->t_distribute_update); @@ -962,6 +965,15 @@ struct ospf_area *ospf_area_new(struct ospf *ospf, struct in_addr area_id) /* Self-originated LSAs initialize. */ new->router_lsa_self = NULL; + /* Initialize FR field */ + new->fr_info.enabled = false; + new->fr_info.configured = false; + new->fr_info.state_changed = false; + new->fr_info.router_lsas_recv_dc_bit = 0; + new->fr_info.indication_lsa_self = NULL; + new->fr_info.area_ind_lsa_recvd = false; + new->fr_info.area_dc_clear = false; + ospf_opaque_type10_lsa_init(new); new->oiflist = list_new(); -- cgit v1.2.3