forked from Mirror/frr
pim6d: Adding ipv6 mld last-member-query-count CLI
Adding the Interface level config command ipv6 mld last-member-query-count (1-255) This command can be use to tune the number of Multicast-Address- Specific Queries sent before the router assumes there are no remaining listeners for an address on a link. Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
This commit is contained in:
parent
c8b3d45de2
commit
c889adcb26
|
@ -648,6 +648,29 @@ DEFPY (interface_no_ipv6_mld_query_max_response_time,
|
||||||
return gm_process_no_query_max_response_time_cmd(vty);
|
return gm_process_no_query_max_response_time_cmd(vty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFPY (interface_ipv6_mld_last_member_query_count,
|
||||||
|
interface_ipv6_mld_last_member_query_count_cmd,
|
||||||
|
"ipv6 mld last-member-query-count (1-255)$lmqc",
|
||||||
|
IPV6_STR
|
||||||
|
IFACE_MLD_STR
|
||||||
|
IFACE_MLD_LAST_MEMBER_QUERY_COUNT_STR
|
||||||
|
"Last member query count\n")
|
||||||
|
{
|
||||||
|
return gm_process_last_member_query_count_cmd(vty, lmqc_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFPY (interface_no_ipv6_mld_last_member_query_count,
|
||||||
|
interface_no_ipv6_mld_last_member_query_count_cmd,
|
||||||
|
"no ipv6 mld last-member-query-count [(1-255)]",
|
||||||
|
NO_STR
|
||||||
|
IPV6_STR
|
||||||
|
IFACE_MLD_STR
|
||||||
|
IFACE_MLD_LAST_MEMBER_QUERY_COUNT_STR
|
||||||
|
IGNORED_IN_NO_STR)
|
||||||
|
{
|
||||||
|
return gm_process_no_last_member_query_count_cmd(vty);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY (show_ipv6_pim_rp,
|
DEFPY (show_ipv6_pim_rp,
|
||||||
show_ipv6_pim_rp_cmd,
|
show_ipv6_pim_rp_cmd,
|
||||||
"show ipv6 pim [vrf NAME] rp-info [X:X::X:X/M$group] [json$json]",
|
"show ipv6 pim [vrf NAME] rp-info [X:X::X:X/M$group] [json$json]",
|
||||||
|
@ -1528,6 +1551,10 @@ void pim_cmd_init(void)
|
||||||
&interface_ipv6_mld_query_max_response_time_cmd);
|
&interface_ipv6_mld_query_max_response_time_cmd);
|
||||||
install_element(INTERFACE_NODE,
|
install_element(INTERFACE_NODE,
|
||||||
&interface_no_ipv6_mld_query_max_response_time_cmd);
|
&interface_no_ipv6_mld_query_max_response_time_cmd);
|
||||||
|
install_element(INTERFACE_NODE,
|
||||||
|
&interface_ipv6_mld_last_member_query_count_cmd);
|
||||||
|
install_element(INTERFACE_NODE,
|
||||||
|
&interface_no_ipv6_mld_last_member_query_count_cmd);
|
||||||
|
|
||||||
install_element(VIEW_NODE, &show_ipv6_pim_rp_cmd);
|
install_element(VIEW_NODE, &show_ipv6_pim_rp_cmd);
|
||||||
install_element(VIEW_NODE, &show_ipv6_pim_rp_vrf_all_cmd);
|
install_element(VIEW_NODE, &show_ipv6_pim_rp_vrf_all_cmd);
|
||||||
|
|
|
@ -5733,34 +5733,15 @@ DEFUN_HIDDEN (interface_no_ip_igmp_query_max_response_time_dsec,
|
||||||
"frr-routing:ipv4");
|
"frr-routing:ipv4");
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (interface_ip_igmp_last_member_query_count,
|
DEFPY (interface_ip_igmp_last_member_query_count,
|
||||||
interface_ip_igmp_last_member_query_count_cmd,
|
interface_ip_igmp_last_member_query_count_cmd,
|
||||||
"ip igmp last-member-query-count (1-255)",
|
"ip igmp last-member-query-count (1-255)$lmqc",
|
||||||
IP_STR
|
IP_STR
|
||||||
IFACE_IGMP_STR
|
IFACE_IGMP_STR
|
||||||
IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
|
IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
|
||||||
"Last member query count\n")
|
"Last member query count\n")
|
||||||
{
|
{
|
||||||
const struct lyd_node *pim_enable_dnode;
|
return gm_process_last_member_query_count_cmd(vty, lmqc_str);
|
||||||
|
|
||||||
pim_enable_dnode =
|
|
||||||
yang_dnode_getf(vty->candidate_config->dnode,
|
|
||||||
FRR_PIM_ENABLE_XPATH, VTY_CURR_XPATH,
|
|
||||||
"frr-routing:ipv4");
|
|
||||||
if (!pim_enable_dnode) {
|
|
||||||
nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY,
|
|
||||||
"true");
|
|
||||||
} else {
|
|
||||||
if (!yang_dnode_get_bool(pim_enable_dnode, "."))
|
|
||||||
nb_cli_enqueue_change(vty, "./enable",
|
|
||||||
NB_OP_MODIFY, "true");
|
|
||||||
}
|
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_MODIFY,
|
|
||||||
argv[3]->arg);
|
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
|
||||||
"frr-routing:ipv4");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (interface_no_ip_igmp_last_member_query_count,
|
DEFUN (interface_no_ip_igmp_last_member_query_count,
|
||||||
|
@ -5772,11 +5753,7 @@ DEFUN (interface_no_ip_igmp_last_member_query_count,
|
||||||
IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
|
IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
|
||||||
IGNORED_IN_NO_STR)
|
IGNORED_IN_NO_STR)
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_DESTROY,
|
return gm_process_no_last_member_query_count_cmd(vty);
|
||||||
NULL);
|
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
|
||||||
"frr-routing:ipv4");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (interface_ip_igmp_last_member_query_interval,
|
DEFUN (interface_ip_igmp_last_member_query_interval,
|
||||||
|
|
|
@ -2780,3 +2780,33 @@ int gm_process_no_query_max_response_time_cmd(struct vty *vty)
|
||||||
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
||||||
FRR_PIM_AF_XPATH_VAL);
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int gm_process_last_member_query_count_cmd(struct vty *vty,
|
||||||
|
const char *lmqc_str)
|
||||||
|
{
|
||||||
|
const struct lyd_node *pim_enable_dnode;
|
||||||
|
|
||||||
|
pim_enable_dnode = yang_dnode_getf(vty->candidate_config->dnode,
|
||||||
|
FRR_PIM_ENABLE_XPATH, VTY_CURR_XPATH,
|
||||||
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
|
if (!pim_enable_dnode) {
|
||||||
|
nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, "true");
|
||||||
|
} else {
|
||||||
|
if (!yang_dnode_get_bool(pim_enable_dnode, "."))
|
||||||
|
nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY,
|
||||||
|
"true");
|
||||||
|
}
|
||||||
|
|
||||||
|
nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_MODIFY,
|
||||||
|
lmqc_str);
|
||||||
|
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
||||||
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
int gm_process_no_last_member_query_count_cmd(struct vty *vty)
|
||||||
|
{
|
||||||
|
nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_DESTROY,
|
||||||
|
NULL);
|
||||||
|
return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
|
||||||
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
|
}
|
||||||
|
|
|
@ -96,6 +96,9 @@ void pim_show_neighbors(struct pim_instance *pim, struct vty *vty,
|
||||||
int gm_process_query_max_response_time_cmd(struct vty *vty,
|
int gm_process_query_max_response_time_cmd(struct vty *vty,
|
||||||
const char *qmrt_str);
|
const char *qmrt_str);
|
||||||
int gm_process_no_query_max_response_time_cmd(struct vty *vty);
|
int gm_process_no_query_max_response_time_cmd(struct vty *vty);
|
||||||
|
int gm_process_last_member_query_count_cmd(struct vty *vty,
|
||||||
|
const char *lmqc_str);
|
||||||
|
int gm_process_no_last_member_query_count_cmd(struct vty *vty);
|
||||||
/*
|
/*
|
||||||
* Special Macro to allow us to get the correct pim_instance
|
* Special Macro to allow us to get the correct pim_instance
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2794,6 +2794,7 @@ int lib_interface_gmp_address_family_last_member_query_interval_modify(
|
||||||
int lib_interface_gmp_address_family_robustness_variable_modify(
|
int lib_interface_gmp_address_family_robustness_variable_modify(
|
||||||
struct nb_cb_modify_args *args)
|
struct nb_cb_modify_args *args)
|
||||||
{
|
{
|
||||||
|
#if PIM_IPV == 4
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
struct pim_interface *pim_ifp;
|
struct pim_interface *pim_ifp;
|
||||||
int last_member_query_count;
|
int last_member_query_count;
|
||||||
|
@ -2812,6 +2813,9 @@ int lib_interface_gmp_address_family_robustness_variable_modify(
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* TBD Depends on MLD data structure changes */
|
||||||
|
#endif
|
||||||
|
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue