]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Validation that hello should be less than hold time config.
authorMobashshera Rasool <mrasool@vmware.com>
Thu, 25 Mar 2021 05:12:57 +0000 (05:12 +0000)
committerMobashshera Rasool <mrasool@vmware.com>
Thu, 25 Mar 2021 10:27:40 +0000 (10:27 +0000)
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>
pimd/pim_cmd.c
pimd/pim_nb_config.c
yang/frr-pim.yang

index ae5b7940e9faaf5cc49726192f470dfef92585b8..25fae26d06a014643b36b0d9c85878b59907d48f 100644 (file)
@@ -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",
index a7d7551cbdc0e3997c926ec8b94881a66b7f1e1e..ca6718657daf8942f19f304a76d01a5db2288b2d 100644 (file)
@@ -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;
        }
 
index f959ff8be5c859e8bf61c624352cdd523b42e9a2..2070649ec205da175fbfe66b46e951e5df6b9926 100644 (file)
@@ -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";
     }