#include "pim_rp.h"
#include "pim_jp_agg.h"
#include "pim_util.h"
+#include "pim_ssm.h"
static void on_trace(const char *label, struct interface *ifp,
struct in_addr src)
struct prefix_sg *sg, uint8_t source_flags)
{
struct pim_interface *pim_ifp = NULL;
+ char buf[PREFIX_STRLEN];
if (PIM_DEBUG_PIM_TRACE) {
char up_str[INET_ADDRSTRLEN];
return;
}
+ if (pim_is_grp_ssm(pim_ifp->pim, sg->grp)) {
+ zlog_warn(
+ "%s: Specified Group(%s) in join is now in SSM, not allowed to create PIM state",
+ __func__,
+ inet_ntop(AF_INET, &sg->grp, buf, sizeof(buf)));
+ return;
+ }
+
sg->src.s_addr = INADDR_ANY;
}
int i_am_rp = 0;
struct pim_interface *pim_ifp = ifp->info;
struct pim_instance *pim = pim_ifp->pim;
+ char buf[PREFIX_STRLEN];
#define PIM_MSG_REGISTER_BIT_RESERVED_LEN 4
ip_hdr = (struct ip *)(tlv_buf + PIM_MSG_REGISTER_BIT_RESERVED_LEN);
pim_str_sg_dump(&sg), src_str, ifp->name, i_am_rp);
}
+ if (pim_is_grp_ssm(pim_ifp->pim, sg.grp)) {
+ if (sg.src.s_addr == INADDR_ANY) {
+ zlog_warn(
+ "%s: Received Register message for Group(%s) is now in SSM, dropping the packet",
+ __func__,
+ inet_ntop(AF_INET, &sg.grp, buf, sizeof(buf)));
+ /* Drop Packet Silently */
+ return 0;
+ }
+ }
+
if (i_am_rp
&& (dest_addr.s_addr
== ((RP(pim, sg.grp))->rpf_addr.u.prefix4.s_addr))) {