summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2021-03-25 06:12:57 +0100
committerMobashshera Rasool <mrasool@vmware.com>2021-03-25 11:27:40 +0100
commit899dd3392a6ad27a61a6d517f2166e70d487c42d (patch)
tree7a3785333832a0ad8cdbc43be9abf4bebf1c565a
parentMerge pull request #8318 from qlyoung/improve-lua-autoconf-detection (diff)
downloadfrr-899dd3392a6ad27a61a6d517f2166e70d487c42d.tar.xz
frr-899dd3392a6ad27a61a6d517f2166e70d487c42d.zip
pimd: Validation that hello should be less than hold time config.
Also included display of hold time in CLI 'show ip pim int <intf>' cmd and json commands. Issue: PIM neighbor not coming up if hold time is less than hello timer since hello is sent every 4 sec and hold is 1 sec, because of this nbr is flapping Fix: Do not allow configuration of hold timer less than hello timer Also reset the value of hold timer to 3.5 times to hello whenever only hello is modified so that the relationship holds good. Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
-rw-r--r--pimd/pim_cmd.c4
-rw-r--r--pimd/pim_nb_config.c1
-rw-r--r--yang/frr-pim.yang3
3 files changed, 8 insertions, 0 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index ae5b7940e..25fae26d0 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -1094,6 +1094,8 @@ static void pim_show_interfaces_single(struct pim_instance *pim,
json_object_int_add(json_row, "helloPeriod",
pim_ifp->pim_hello_period);
+ json_object_int_add(json_row, "holdTime",
+ PIM_IF_DEFAULT_HOLDTIME(pim_ifp));
json_object_string_add(json_row, "helloTimer",
hello_timer);
json_object_string_add(json_row, "helloStatStart",
@@ -1243,6 +1245,8 @@ static void pim_show_interfaces_single(struct pim_instance *pim,
vty_out(vty, "------\n");
vty_out(vty, "Period : %d\n",
pim_ifp->pim_hello_period);
+ vty_out(vty, "HoldTime : %d\n",
+ PIM_IF_DEFAULT_HOLDTIME(pim_ifp));
vty_out(vty, "Timer : %s\n", hello_timer);
vty_out(vty, "StatStart : %s\n", stat_uptime);
vty_out(vty, "Receive : %d\n",
diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c
index a7d7551cb..ca6718657 100644
--- a/pimd/pim_nb_config.c
+++ b/pimd/pim_nb_config.c
@@ -1830,6 +1830,7 @@ int lib_interface_pim_hello_interval_modify(struct nb_cb_modify_args *args)
pim_ifp = ifp->info;
pim_ifp->pim_hello_period =
yang_dnode_get_uint8(args->dnode, NULL);
+ pim_ifp->pim_default_holdtime = -1;
break;
}
diff --git a/yang/frr-pim.yang b/yang/frr-pim.yang
index f959ff8be..2070649ec 100644
--- a/yang/frr-pim.yang
+++ b/yang/frr-pim.yang
@@ -294,6 +294,9 @@ module frr-pim {
type uint8 {
range "1..180";
}
+ must ". > ./../hello-interval" {
+ error-message "HoldTime must be greater than Hello";
+ }
description
"Hello holdtime";
}