From 6eedc1a5b9d67e0c55b89125b5ddd584b4bd5e32 Mon Sep 17 00:00:00 2001 From: github login name Date: Mon, 5 Jul 2021 00:16:10 -0700 Subject: [PATCH 1/3] pimd: Adding BSM status in the show commands Adding BSM status in the CLI and json output for "show ip pim interface" Signed-off-by: Mobashshera Rasool --- pimd/pim_cmd.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index cc11a3cc17..0e8fb2b791 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -1135,6 +1135,12 @@ static void pim_show_interfaces_single(struct pim_instance *pim, json_object_int_add( json_row, "overrideIntervalHighest", pim_ifp->pim_neighbors_highest_override_interval_msec); + if (pim_ifp->bsm_enable) + json_object_boolean_true_add(json_row, + "bsmEnabled"); + if (pim_ifp->ucast_bsm_accept) + json_object_boolean_true_add(json_row, + "ucastBsmEnabled"); json_object_object_add(json, ifp->name, json_row); } else { @@ -1289,6 +1295,15 @@ static void pim_show_interfaces_single(struct pim_instance *pim, pim_ifp->pim_neighbors_highest_override_interval_msec); vty_out(vty, "\n"); vty_out(vty, "\n"); + + vty_out(vty, "BSM Status\n"); + vty_out(vty, "----------\n"); + vty_out(vty, "Bsm Enabled : %s\n", + pim_ifp->bsm_enable ? "yes" : "no"); + vty_out(vty, "Unicast Bsm Enabled : %s\n", + pim_ifp->ucast_bsm_accept ? "yes" : "no"); + vty_out(vty, "\n"); + vty_out(vty, "\n"); } } From 142774530ade49f63997bd52c434457fe8979bdf Mon Sep 17 00:00:00 2001 From: github login name Date: Mon, 5 Jul 2021 04:07:25 -0700 Subject: [PATCH 2/3] pimd: make pim interface hold interval range 1-630 Making the interface holdtime range to 3.5 times the hello-time As per 7761, Section 4.11: The Holdtime in a Hello message should be set to (3.5 * Hello_Period), giving a default value of 105 seconds. Therefore providing the user also to configure max upto 3.5 times the hello timer interval. Signed-off-by: Mobashshera Rasool --- doc/user/pim.rst | 2 +- pimd/pim_cmd.c | 4 ++-- pimd/pim_nb_config.c | 2 +- yang/frr-pim.yang | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/user/pim.rst b/doc/user/pim.rst index 83d19d6188..4b67326b3d 100644 --- a/doc/user/pim.rst +++ b/doc/user/pim.rst @@ -199,7 +199,7 @@ is in a vrf, enter the interface command with the vrf keyword at the end. Set the DR Priority for the interface. This command is useful to allow the user to influence what node becomes the DR for a lan segment. -.. clicmd:: ip pim hello (1-180) (1-180) +.. clicmd:: ip pim hello (1-180) (1-630) Set the pim hello and hold interval for a interface. diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 0e8fb2b791..5adecf5e32 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -8767,7 +8767,7 @@ DEFUN (interface_no_ip_mroute, DEFUN (interface_ip_pim_hello, interface_ip_pim_hello_cmd, - "ip pim hello (1-180) [(1-180)]", + "ip pim hello (1-180) [(1-630)]", IP_STR PIM_STR IFACE_PIM_HELLO_STR @@ -8802,7 +8802,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-630)]]", NO_STR IP_STR PIM_STR diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index dfdbd6dee2..bd5e215027 100644 --- a/pimd/pim_nb_config.c +++ b/pimd/pim_nb_config.c @@ -1613,7 +1613,7 @@ int lib_interface_pim_hello_holdtime_modify(struct nb_cb_modify_args *args) ifp = nb_running_get_entry(args->dnode, NULL, true); pim_ifp = ifp->info; pim_ifp->pim_default_holdtime = - yang_dnode_get_uint8(args->dnode, NULL); + yang_dnode_get_uint16(args->dnode, NULL); break; } diff --git a/yang/frr-pim.yang b/yang/frr-pim.yang index 6329e45588..f73776c1af 100644 --- a/yang/frr-pim.yang +++ b/yang/frr-pim.yang @@ -351,8 +351,8 @@ module frr-pim { } leaf hello-holdtime { - type uint8 { - range "1..180"; + type uint16 { + range "1..630"; } must ". > ./../hello-interval" { error-message "HoldTime must be greater than Hello"; From 69b2df12bb54f5a776dc40bb4b360a152b2cc9c8 Mon Sep 17 00:00:00 2001 From: github login name Date: Mon, 5 Jul 2021 04:42:42 -0700 Subject: [PATCH 3/3] pimd: zlog_info changed to zlog_notice for neighbor up/down event Co-authored-by: Sarita Patra Signed-off-by: Mobashshera Rasool --- pimd/pim_neighbor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 48b1a30f2d..571173c62a 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -350,8 +350,8 @@ pim_neighbor_new(struct interface *ifp, struct in_addr source_addr, __func__, src_str, ifp->name); } - zlog_info("PIM NEIGHBOR UP: neighbor %s on interface %s", src_str, - ifp->name); + zlog_notice("PIM NEIGHBOR UP: neighbor %s on interface %s", src_str, + ifp->name); if (neigh->propagation_delay_msec > pim_ifp->pim_neighbors_highest_propagation_delay_msec) { @@ -616,8 +616,8 @@ void pim_neighbor_delete(struct interface *ifp, struct pim_neighbor *neigh, assert(pim_ifp); pim_inet4_dump("", neigh->source_addr, src_str, sizeof(src_str)); - zlog_info("PIM NEIGHBOR DOWN: neighbor %s on interface %s: %s", src_str, - ifp->name, delete_message); + zlog_notice("PIM NEIGHBOR DOWN: neighbor %s on interface %s: %s", + src_str, ifp->name, delete_message); THREAD_OFF(neigh->t_expire_timer);