summaryrefslogtreecommitdiff
path: root/pimd/pim_tib.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_tib.c')
-rw-r--r--pimd/pim_tib.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/pimd/pim_tib.c b/pimd/pim_tib.c
index 4081786c1e..ac07154f86 100644
--- a/pimd/pim_tib.c
+++ b/pimd/pim_tib.c
@@ -78,6 +78,31 @@ tib_sg_oil_setup(struct pim_instance *pim, pim_sgaddr sg, struct interface *oif)
return pim_channel_oil_add(pim, &sg, __func__);
}
+void tib_sg_proxy_join_prune_check(struct pim_instance *pim, pim_sgaddr sg,
+ struct interface *oif, bool join)
+{
+ struct interface *ifp;
+
+ FOR_ALL_INTERFACES (pim->vrf, ifp) {
+ struct pim_interface *pim_ifp = ifp->info;
+
+ if (!pim_ifp)
+ continue;
+
+ if (ifp == oif) /* skip the source interface */
+ continue;
+
+ if (pim_ifp->gm_enable && pim_ifp->gm_proxy) {
+ if (join)
+ pim_if_gm_join_add(ifp, sg.grp, sg.src,
+ GM_JOIN_PROXY);
+ else
+ pim_if_gm_join_del(ifp, sg.grp, sg.src,
+ GM_JOIN_PROXY);
+ }
+ } /* scan interfaces */
+}
+
bool tib_sg_gm_join(struct pim_instance *pim, pim_sgaddr sg,
struct interface *oif, struct channel_oil **oilp)
{
@@ -95,6 +120,8 @@ bool tib_sg_gm_join(struct pim_instance *pim, pim_sgaddr sg,
if (!*oilp)
return false;
+ tib_sg_proxy_join_prune_check(pim, sg, oif, true);
+
if (PIM_I_am_DR(pim_oif) || PIM_I_am_DualActive(pim_oif)) {
int result;
@@ -137,6 +164,8 @@ void tib_sg_gm_prune(struct pim_instance *pim, pim_sgaddr sg,
{
int result;
+ tib_sg_proxy_join_prune_check(pim, sg, oif, false);
+
/*
It appears that in certain circumstances that
igmp_source_forward_stop is called when IGMP forwarding
@@ -164,5 +193,5 @@ void tib_sg_gm_prune(struct pim_instance *pim, pim_sgaddr sg,
*/
pim_ifchannel_local_membership_del(oif, &sg);
- pim_channel_oil_del(*oilp, __func__);
+ *oilp = pim_channel_oil_del(*oilp, __func__);
}