summaryrefslogtreecommitdiff
path: root/pimd/pim_iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_iface.c')
-rw-r--r--pimd/pim_iface.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 20e3ba184b..9316cebc0a 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -38,6 +38,7 @@
#include "pim_igmp_join.h"
#include "pim_vxlan.h"
#include "pim_tib.h"
+#include "pim_util.h"
#include "pim6_mld.h"
@@ -215,7 +216,6 @@ void pim_if_delete(struct interface *ifp)
if (pim_ifp->bfd_config.profile)
XFREE(MTYPE_TMP, pim_ifp->bfd_config.profile);
- XFREE(MTYPE_PIM_INTERFACE, pim_ifp->boundary_oil_plist);
XFREE(MTYPE_PIM_INTERFACE, pim_ifp);
ifp->info = NULL;
@@ -601,26 +601,13 @@ void pim_if_addr_add(struct connected *ifc)
ifp->name);
}
}
- struct pim_nexthop_cache *pnc = NULL;
- struct pim_rpf rpf;
- struct zclient *zclient = NULL;
-
- zclient = pim_zebra_zclient_get();
- /* RP config might come prior to (local RP's interface)
- IF UP event.
- In this case, pnc would not have pim enabled
- nexthops.
- Once Interface is UP and pim info is available,
- reregister
- with RNH address to receive update and add the
- interface as nexthop. */
- memset(&rpf, 0, sizeof(struct pim_rpf));
- rpf.rpf_addr = pim_addr_from_prefix(ifc->address);
- pnc = pim_nexthop_cache_find(pim_ifp->pim, &rpf);
- if (pnc)
- pim_sendmsg_zebra_rnh(pim_ifp->pim, zclient,
- pnc,
- ZEBRA_NEXTHOP_REGISTER);
+
+ /* RP config might come prior to local RP's interface IF UP event.
+ * In this case, pnc would not have pim enabled nexthops. Once
+ * Interface is UP and pim info is available, reregister with RNH
+ * address to receive update and add the interface as nexthop.
+ */
+ pim_nht_get(pim_ifp->pim, pim_addr_from_prefix(ifc->address));
}
} /* pim */
@@ -1258,6 +1245,14 @@ static int gm_join_sock(const char *ifname, ifindex_t ifindex,
{
int join_fd;
+ if (pim_is_group_filtered(pim_ifp, &group_addr, &source_addr)) {
+ if (PIM_DEBUG_GM_EVENTS) {
+ zlog_debug("%s: join failed for (S,G)=(%pPAs,%pPAs) due to multicast boundary filtering",
+ __func__, &source_addr, &group_addr);
+ }
+ return -1;
+ }
+
pim_ifp->igmp_ifstat_joins_sent++;
join_fd = pim_socket_raw(IPPROTO_GM);
@@ -1464,8 +1459,7 @@ static void pim_if_gm_join_del_all(struct interface *ifp)
return;
for (ALL_LIST_ELEMENTS(pim_ifp->gm_join_list, node, nextnode, ij))
- pim_if_gm_join_del(ifp, ij->group_addr, ij->source_addr,
- GM_JOIN_STATIC);
+ pim_if_gm_join_del(ifp, ij->group_addr, ij->source_addr, ij->join_type);
}
ferr_r pim_if_static_group_add(struct interface *ifp, pim_addr group_addr,
@@ -2036,7 +2030,7 @@ void pim_pim_interface_delete(struct interface *ifp)
* pim_ifp->pim_neighbor_list.
*/
pim_sock_delete(ifp, "pim unconfigured on interface");
- pim_upstream_nh_if_update(pim_ifp->pim, ifp);
+ pim_nht_upstream_if_update(pim_ifp->pim, ifp);
if (!pim_ifp->gm_enable) {
pim_if_addr_del_all(ifp);