diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2021-03-25 10:19:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-25 10:19:12 -0400 |
| commit | 89bf9d220df653f9c4662bab2ad1f8daccc5140c (patch) | |
| tree | 842bedacfecafc1436f300c22814b61fd87a8443 | |
| parent | 0621b32e25df0f38dbb68e77f3002294db3b33da (diff) | |
| parent | 93839459dc220646827a61e95594a1b6421cb7e1 (diff) | |
Merge pull request #8333 from mobash-rasool/pim-fixes-2
pimd: Fix hold time related issues
| -rw-r--r-- | pimd/pim_cmd.c | 6 | ||||
| -rw-r--r-- | pimd/pim_nb_config.c | 1 | ||||
| -rw-r--r-- | yang/frr-pim.yang | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index ae5b7940e9..4bbe7d35f0 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", @@ -8987,7 +8991,7 @@ DEFUN (interface_ip_pim_hello, DEFUN (interface_no_ip_pim_hello, interface_no_ip_pim_hello_cmd, - "no ip pim hello [(1-180) (1-180)]", + "no ip pim hello [(1-180) [(1-180)]]", NO_STR IP_STR PIM_STR diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index e852a87683..475e393cf0 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 f959ff8be5..2070649ec2 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"; } |
