summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.c
diff options
context:
space:
mode:
authorManoj Naragund <mnaragund@vmware.com>2022-11-21 11:32:53 +0100
committerManoj Naragund <mnaragund@vmware.com>2023-01-20 06:02:34 +0100
commit6f7bbc0cec557e3f87a83c7481f92de68485cdb9 (patch)
treefe7521f6d1aebcc5f775e2fb7f40dc7c8daa93cc /ospfd/ospfd.c
parentMerge pull request #12350 from kuldeepkash/pim6_fixes (diff)
downloadfrr-6f7bbc0cec557e3f87a83c7481f92de68485cdb9.tar.xz
frr-6f7bbc0cec557e3f87a83c7481f92de68485cdb9.zip
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 <mnaragund@vmware.com>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r--ospfd/ospfd.c12
1 files changed, 12 insertions, 0 deletions
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();