summaryrefslogtreecommitdiff
path: root/ospfd/ospf_vty.c
diff options
context:
space:
mode:
authorManoj Naragund <mnaragund@vmware.com>2022-08-26 00:58:37 -0700
committerManoj Naragund <mnaragund@vmware.com>2022-08-31 23:10:09 -0700
commitb345a3d9b49e9921863f93ba2ee5ed9b43763294 (patch)
tree93adc0a0f122697bae01b3cc3ff93349de512c42 /ospfd/ospf_vty.c
parent0824a0020d94ddf0aafb4f6521f911dadba3fc04 (diff)
ospfd: Added clis to change default timers for LSA refresh and maxage remove delay.
Description: Added hidden clis that will allow you to reset the default timers for LSA refresh and LSA maxage remove delay, these will help in testing LSA refresh scenarios in upcoming OSPFv2 Flood reduction feature(rfc4136). IETF Link : https://datatracker.ietf.org/doc/html/rfc4136 Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
Diffstat (limited to 'ospfd/ospf_vty.c')
-rw-r--r--ospfd/ospf_vty.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 7d72487686..2a0016ea19 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -12952,6 +12952,42 @@ DEFUN (clear_ip_ospf_interface,
return CMD_SUCCESS;
}
+DEFPY_HIDDEN(ospf_lsa_refresh_timer, ospf_lsa_refresh_timer_cmd,
+ "[no$no] ospf lsa-refresh [(120-1800)]$value",
+ NO_STR OSPF_STR
+ "OSPF lsa refresh timer\n"
+ "timer value in seconds\n")
+{
+ VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf)
+
+ if (no)
+ ospf->lsa_refresh_timer = OSPF_LS_REFRESH_TIME;
+ else
+ ospf->lsa_refresh_timer = value;
+
+ return CMD_SUCCESS;
+}
+
+DEFPY_HIDDEN(ospf_maxage_delay_timer, ospf_maxage_delay_timer_cmd,
+ "[no$no] ospf maxage-delay [(0-60)]$value",
+ NO_STR OSPF_STR
+ "OSPF lsa maxage delay timer\n"
+ "timer value in seconds\n")
+{
+ VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf)
+
+ if (no)
+ ospf->maxage_delay = OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT;
+ else
+ ospf->maxage_delay = value;
+
+ THREAD_OFF(ospf->t_maxage);
+ OSPF_TIMER_ON(ospf->t_maxage, ospf_maxage_lsa_remover,
+ ospf->maxage_delay);
+
+ return CMD_SUCCESS;
+}
+
void ospf_vty_clear_init(void)
{
install_element(ENABLE_NODE, &clear_ip_ospf_interface_cmd);
@@ -13109,6 +13145,9 @@ void ospf_vty_init(void)
vrf_cmd_init(NULL);
+ install_element(OSPF_NODE, &ospf_lsa_refresh_timer_cmd);
+ install_element(OSPF_NODE, &ospf_maxage_delay_timer_cmd);
+
/* Init interface related vty commands. */
ospf_vty_if_init();