Skip to content

Commit

Permalink
pim6d: PR 10559
Browse files Browse the repository at this point in the history
Signed-off-by: Mobashshera Rasool <[email protected]>
  • Loading branch information
mobash-rasool committed Aug 1, 2022
1 parent ffc3a79 commit 1006598
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pimd/pim6_mld.c
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,22 @@ void gm_ifp_update(struct interface *ifp)
}
}

void gm_group_delete(struct gm_if *gm_ifp)
{
struct gm_sg *sg, *sg_start;

sg_start = gm_sgs_first(gm_ifp->sgs);

/* clean up all mld groups */
frr_each_from (gm_sgs, gm_ifp->sgs, sg, sg_start) {
THREAD_OFF(sg->t_sg_expire);
if (sg->oil)
pim_channel_oil_del(sg->oil, __func__);
gm_sgs_del(gm_ifp->sgs, sg);
gm_sg_free(sg);
}
}

/*
* CLI (show commands only)
*/
Expand Down
1 change: 1 addition & 0 deletions pimd/pim6_mld.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ struct gm_if {
#if PIM_IPV == 6
extern void gm_ifp_update(struct interface *ifp);
extern void gm_ifp_teardown(struct interface *ifp);
extern void gm_group_delete(struct gm_if *gm_ifp);
#else
static inline void gm_ifp_update(struct interface *ifp)
{
Expand Down
7 changes: 7 additions & 0 deletions pimd/pim_cmd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include "pim_static.h"
#include "pim_addr.h"
#include "pim_static.h"
#include "pim6_mld.h"
#include "pim_util.h"

/**
Expand Down Expand Up @@ -3994,6 +3995,12 @@ void clear_mroute(struct pim_instance *pim)
igmp_group_delete(grp);
}
}
#else
struct gm_if *gm_ifp;

gm_ifp = pim_ifp->mld;
if (gm_ifp)
gm_group_delete(gm_ifp);
#endif
}

Expand Down

0 comments on commit 1006598

Please sign in to comment.