summaryrefslogtreecommitdiffstats
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-07-13 16:54:39 +0200
committerGitHub <noreply@github.com>2022-07-13 16:54:39 +0200
commit1004137bf3ac8c71fdddba6c1a4dc1f37646ac40 (patch)
tree3c9cfe531630c2d79e58f5be34e431cbf83e8cd2 /pimd/pim_cmd.c
parentMerge pull request #11585 from patrasar/sg_str (diff)
parentpimd: Remove pim_get_pim_instance defination in pim_cmd_common.h (diff)
downloadfrr-1004137bf3ac8c71fdddba6c1a4dc1f37646ac40.tar.xz
frr-1004137bf3ac8c71fdddba6c1a4dc1f37646ac40.zip
Merge pull request #11598 from patrasar/pim_get_instance
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index 843b24efd..f62b90a9d 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -4162,26 +4162,21 @@ DEFPY_HIDDEN (pim_test_sg_keepalive,
"The Group we are resetting\n")
{
struct pim_upstream *up;
+ struct vrf *vrf;
struct pim_instance *pim;
pim_sgaddr sg;
sg.src = source;
sg.grp = group;
- if (!name)
- pim = pim_get_pim_instance(VRF_DEFAULT);
- else {
- struct vrf *vrf = vrf_lookup_by_name(name);
-
- if (!vrf) {
- vty_out(vty, "%% Vrf specified: %s does not exist\n",
- name);
- return CMD_WARNING;
- }
-
- pim = pim_get_pim_instance(vrf->vrf_id);
+ vrf = vrf_lookup_by_name(name ? name : VRF_DEFAULT_NAME);
+ if (!vrf) {
+ vty_out(vty, "%% Vrf specified: %s does not exist\n", name);
+ return CMD_WARNING;
}
+ pim = vrf->info;
+
if (!pim) {
vty_out(vty, "%% Unable to find pim instance\n");
return CMD_WARNING;