summaryrefslogtreecommitdiffstats
path: root/pimd/pim_cmd.c
diff options
context:
space:
mode:
authorAbhishek N R <abnr@vmware.com>2022-07-19 08:44:47 +0200
committerAbhishek N R <abnr@vmware.com>2022-07-19 14:48:52 +0200
commit23db4cbd3d6131c8235f6c92058e9b317d62c02c (patch)
treeabc668a8562e41b26ef8da464be8c259d2243e8b /pimd/pim_cmd.c
parentMerge pull request #11632 from opensourcerouting/fix/address_family_bgp_str (diff)
downloadfrr-23db4cbd3d6131c8235f6c92058e9b317d62c02c.tar.xz
frr-23db4cbd3d6131c8235f6c92058e9b317d62c02c.zip
pim6d: Implementing "clear ipv6 pim interfaces" command.
Signed-off-by: Abhishek N R <abnr@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r--pimd/pim_cmd.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c
index f62b90a9d..968149380 100644
--- a/pimd/pim_cmd.c
+++ b/pimd/pim_cmd.c
@@ -1521,17 +1521,6 @@ static void clear_igmp_interfaces(struct pim_instance *pim)
pim_if_addr_add_all(ifp);
}
-static void clear_pim_interfaces(struct pim_instance *pim)
-{
- struct interface *ifp;
-
- FOR_ALL_INTERFACES (pim->vrf, ifp) {
- if (ifp->info) {
- pim_neighbor_delete_all(ifp, "interface cleared");
- }
- }
-}
-
static void clear_interfaces(struct pim_instance *pim)
{
clear_igmp_interfaces(pim);
@@ -1670,7 +1659,7 @@ DEFPY (clear_ip_mroute,
return CMD_SUCCESS;
}
-DEFUN (clear_ip_pim_interfaces,
+DEFPY (clear_ip_pim_interfaces,
clear_ip_pim_interfaces_cmd,
"clear ip pim [vrf NAME] interfaces",
CLEAR_STR
@@ -1679,13 +1668,12 @@ DEFUN (clear_ip_pim_interfaces,
VRF_CMD_HELP_STR
"Reset PIM interfaces\n")
{
- int idx = 2;
- struct vrf *vrf = pim_cmd_lookup_vrf(vty, argv, argc, &idx);
+ struct vrf *v = pim_cmd_lookup(vty, vrf);
- if (!vrf)
+ if (!v)
return CMD_WARNING;
- clear_pim_interfaces(vrf->info);
+ clear_pim_interfaces(v->info);
return CMD_SUCCESS;
}