summaryrefslogtreecommitdiffstats
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorAdriano Marto Reis <adrianomarto@gmail.com>2021-09-28 04:38:41 +0200
committerAdriano Marto Reis <adrianomarto@gmail.com>2021-09-28 04:43:52 +0200
commit4687748973ff1d062af3347180fafb23ae877d09 (patch)
tree32940fdf11ea5a2fb4aa3fc6119cc82ebfe573cf /pimd/pim_cmd.c
parentMerge pull request #9235 from AnuradhaKaruppiah/nht_mh (diff)
downloadfrr-4687748973ff1d062af3347180fafb23ae877d09.tar.xz
frr-4687748973ff1d062af3347180fafb23ae877d09.zip
pimd: fixing command "no ip msdp mesh-group member"
Deleting a mesh-group member no longer deletes the mesh-group. Complete bug description at: https://github.com/FRRouting/frr/issues/9664 Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 14aa71052..ca61d6c57 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -3842,7 +3842,7 @@ static void pim_cli_legacy_mesh_group_behavior(struct vty *vty,
xpath_member_value)) {
member_dnode = yang_dnode_get(vty->candidate_config->dnode,
xpath_member_value);
- if (!yang_is_last_list_dnode(member_dnode))
+ if (!member_dnode || !yang_is_last_list_dnode(member_dnode))
return;
}
@@ -9762,7 +9762,7 @@ DEFPY(no_ip_msdp_mesh_group_member,
return CMD_WARNING_CONFIG_FAILED;
}
- nb_cli_enqueue_change(vty, xpath_value, NB_OP_DESTROY, NULL);
+ nb_cli_enqueue_change(vty, xpath_member_value, NB_OP_DESTROY, NULL);
/*
* If this is the last member, then we must remove the group altogether
@@ -9796,7 +9796,7 @@ DEFPY(ip_msdp_mesh_group_source,
"frr-pim:pimd", "pim", vrfname, "frr-routing:ipv4", gname);
nb_cli_enqueue_change(vty, xpath_value, NB_OP_CREATE, NULL);
- /* Create mesh group member. */
+ /* Create mesh group source. */
strlcat(xpath_value, "/source", sizeof(xpath_value));
nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, saddr_str);
@@ -9827,7 +9827,7 @@ DEFPY(no_ip_msdp_mesh_group_source,
"frr-pim:pimd", "pim", vrfname, "frr-routing:ipv4", gname);
nb_cli_enqueue_change(vty, xpath_value, NB_OP_CREATE, NULL);
- /* Create mesh group member. */
+ /* Create mesh group source. */
strlcat(xpath_value, "/source", sizeof(xpath_value));
nb_cli_enqueue_change(vty, xpath_value, NB_OP_DESTROY, NULL);