mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 03:47:47 +00:00
pim6d: Add [no] ipv6 pim unicast-bsm" command
Introduced common api pim_process_unicast_bsm_cmd, pim_process_no_unicast_bsm_cmd which will process both "[no] ip pim unicast-bsm" command and "[no] ipv6 pim unicast-bsm" command. Signed-off-by: Sarita Patra <saritap@vmware.com>
This commit is contained in:
parent
5e651c3699
commit
dfeda85c4b
@ -497,6 +497,27 @@ DEFPY (no_ipv6_pim_bsm,
|
|||||||
return pim_process_no_bsm_cmd(vty);
|
return pim_process_no_bsm_cmd(vty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFPY (ipv6_pim_ucast_bsm,
|
||||||
|
ipv6_pim_ucast_bsm_cmd,
|
||||||
|
"ipv6 pim unicast-bsm",
|
||||||
|
IPV6_STR
|
||||||
|
PIM_STR
|
||||||
|
"Accept/Send unicast BSM on the interface\n")
|
||||||
|
{
|
||||||
|
return pim_process_unicast_bsm_cmd(vty);
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFPY (no_ipv6_pim_ucast_bsm,
|
||||||
|
no_ipv6_pim_ucast_bsm_cmd,
|
||||||
|
"no ipv6 pim unicast-bsm",
|
||||||
|
NO_STR
|
||||||
|
IPV6_STR
|
||||||
|
PIM_STR
|
||||||
|
"Accept/Send unicast BSM on the interface\n")
|
||||||
|
{
|
||||||
|
return pim_process_no_unicast_bsm_cmd(vty);
|
||||||
|
}
|
||||||
|
|
||||||
DEFPY (ipv6_ssmpingd,
|
DEFPY (ipv6_ssmpingd,
|
||||||
ipv6_ssmpingd_cmd,
|
ipv6_ssmpingd_cmd,
|
||||||
"ipv6 ssmpingd [X:X::X:X]$source",
|
"ipv6 ssmpingd [X:X::X:X]$source",
|
||||||
@ -1708,6 +1729,8 @@ void pim_cmd_init(void)
|
|||||||
/* Install BSM command */
|
/* Install BSM command */
|
||||||
install_element(INTERFACE_NODE, &ipv6_pim_bsm_cmd);
|
install_element(INTERFACE_NODE, &ipv6_pim_bsm_cmd);
|
||||||
install_element(INTERFACE_NODE, &no_ipv6_pim_bsm_cmd);
|
install_element(INTERFACE_NODE, &no_ipv6_pim_bsm_cmd);
|
||||||
|
install_element(INTERFACE_NODE, &ipv6_pim_ucast_bsm_cmd);
|
||||||
|
install_element(INTERFACE_NODE, &no_ipv6_pim_ucast_bsm_cmd);
|
||||||
install_element(CONFIG_NODE, &ipv6_pim_rp_cmd);
|
install_element(CONFIG_NODE, &ipv6_pim_rp_cmd);
|
||||||
install_element(VRF_NODE, &ipv6_pim_rp_cmd);
|
install_element(VRF_NODE, &ipv6_pim_rp_cmd);
|
||||||
install_element(CONFIG_NODE, &no_ipv6_pim_rp_cmd);
|
install_element(CONFIG_NODE, &no_ipv6_pim_rp_cmd);
|
||||||
|
@ -5014,7 +5014,6 @@ DEFUN (ip_pim_bsm,
|
|||||||
{
|
{
|
||||||
return pim_process_bsm_cmd(vty);
|
return pim_process_bsm_cmd(vty);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (no_ip_pim_bsm,
|
DEFUN (no_ip_pim_bsm,
|
||||||
no_ip_pim_bsm_cmd,
|
no_ip_pim_bsm_cmd,
|
||||||
"no ip pim bsm",
|
"no ip pim bsm",
|
||||||
@ -5033,26 +5032,7 @@ DEFUN (ip_pim_ucast_bsm,
|
|||||||
PIM_STR
|
PIM_STR
|
||||||
"Accept/Send unicast BSM on the interface\n")
|
"Accept/Send unicast BSM on the interface\n")
|
||||||
{
|
{
|
||||||
const struct lyd_node *igmp_enable_dnode;
|
return pim_process_unicast_bsm_cmd(vty);
|
||||||
|
|
||||||
igmp_enable_dnode =
|
|
||||||
yang_dnode_getf(vty->candidate_config->dnode,
|
|
||||||
FRR_GMP_ENABLE_XPATH, VTY_CURR_XPATH,
|
|
||||||
"frr-routing:ipv4");
|
|
||||||
if (!igmp_enable_dnode)
|
|
||||||
nb_cli_enqueue_change(vty, "./pim-enable", NB_OP_MODIFY,
|
|
||||||
"true");
|
|
||||||
else {
|
|
||||||
if (!yang_dnode_get_bool(igmp_enable_dnode, "."))
|
|
||||||
nb_cli_enqueue_change(vty, "./pim-enable", NB_OP_MODIFY,
|
|
||||||
"true");
|
|
||||||
}
|
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, "./unicast-bsm", NB_OP_MODIFY, "true");
|
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty,
|
|
||||||
FRR_PIM_INTERFACE_XPATH, "frr-routing:ipv4");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (no_ip_pim_ucast_bsm,
|
DEFUN (no_ip_pim_ucast_bsm,
|
||||||
@ -5061,12 +5041,9 @@ DEFUN (no_ip_pim_ucast_bsm,
|
|||||||
NO_STR
|
NO_STR
|
||||||
IP_STR
|
IP_STR
|
||||||
PIM_STR
|
PIM_STR
|
||||||
"Block send/receive unicast BSM on this interface\n")
|
"Accept/Send unicast BSM on the interface\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./unicast-bsm", NB_OP_MODIFY, "false");
|
return pim_process_no_unicast_bsm_cmd(vty);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty,
|
|
||||||
FRR_PIM_INTERFACE_XPATH, "frr-routing:ipv4");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_BFDD > 0
|
#if HAVE_BFDD > 0
|
||||||
|
@ -3446,6 +3446,36 @@ int pim_process_no_bsm_cmd(struct vty *vty)
|
|||||||
FRR_PIM_AF_XPATH_VAL);
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pim_process_unicast_bsm_cmd(struct vty *vty)
|
||||||
|
{
|
||||||
|
const struct lyd_node *gm_enable_dnode;
|
||||||
|
|
||||||
|
gm_enable_dnode = yang_dnode_getf(vty->candidate_config->dnode,
|
||||||
|
FRR_GMP_ENABLE_XPATH, VTY_CURR_XPATH,
|
||||||
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
|
if (!gm_enable_dnode)
|
||||||
|
nb_cli_enqueue_change(vty, "./pim-enable", NB_OP_MODIFY,
|
||||||
|
"true");
|
||||||
|
else {
|
||||||
|
if (!yang_dnode_get_bool(gm_enable_dnode, "."))
|
||||||
|
nb_cli_enqueue_change(vty, "./pim-enable", NB_OP_MODIFY,
|
||||||
|
"true");
|
||||||
|
}
|
||||||
|
|
||||||
|
nb_cli_enqueue_change(vty, "./unicast-bsm", NB_OP_MODIFY, "true");
|
||||||
|
|
||||||
|
return nb_cli_apply_changes(vty, FRR_PIM_INTERFACE_XPATH,
|
||||||
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
int pim_process_no_unicast_bsm_cmd(struct vty *vty)
|
||||||
|
{
|
||||||
|
nb_cli_enqueue_change(vty, "./unicast-bsm", NB_OP_MODIFY, "false");
|
||||||
|
|
||||||
|
return nb_cli_apply_changes(vty, FRR_PIM_INTERFACE_XPATH,
|
||||||
|
FRR_PIM_AF_XPATH_VAL);
|
||||||
|
}
|
||||||
|
|
||||||
static void show_scan_oil_stats(struct pim_instance *pim, struct vty *vty,
|
static void show_scan_oil_stats(struct pim_instance *pim, struct vty *vty,
|
||||||
time_t now)
|
time_t now)
|
||||||
{
|
{
|
||||||
|
@ -64,6 +64,8 @@ int pim_process_no_ip_mroute_cmd(struct vty *vty, const char *interface,
|
|||||||
const char *group_str, const char *src_str);
|
const char *group_str, const char *src_str);
|
||||||
int pim_process_bsm_cmd(struct vty *vty);
|
int pim_process_bsm_cmd(struct vty *vty);
|
||||||
int pim_process_no_bsm_cmd(struct vty *vty);
|
int pim_process_no_bsm_cmd(struct vty *vty);
|
||||||
|
int pim_process_unicast_bsm_cmd(struct vty *vty);
|
||||||
|
int pim_process_no_unicast_bsm_cmd(struct vty *vty);
|
||||||
void json_object_pim_upstream_add(json_object *json, struct pim_upstream *up);
|
void json_object_pim_upstream_add(json_object *json, struct pim_upstream *up);
|
||||||
void pim_show_rpf(struct pim_instance *pim, struct vty *vty, json_object *json);
|
void pim_show_rpf(struct pim_instance *pim, struct vty *vty, json_object *json);
|
||||||
void pim_show_neighbors_secondary(struct pim_instance *pim, struct vty *vty);
|
void pim_show_neighbors_secondary(struct pim_instance *pim, struct vty *vty);
|
||||||
|
Loading…
Reference in New Issue
Block a user