When a group is in the 224.0.0.0/24 range and we
have igmp v2 turned on do not allow it to be
considered for inclusion as a mroute.
Ticket: CM-13855
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
return NULL;
}
+ if (pim_is_group_224_0_0_0_24 (group_addr))
+ {
+ zlog_warn("%s: Group specified is part of 224.0.0.0/24",
+ __PRETTY_FUNCTION__);
+ return NULL;
+ }
/*
Non-existant group is created as INCLUDE {empty}:
zlog_hexdump(buf, size);
}
+int
+pim_is_group_224_0_0_0_24 (struct in_addr group_addr)
+{
+ static int first = 1;
+ static struct prefix group_224;
+ struct prefix group;
+
+ if (first)
+ {
+ str2prefix ("224.0.0.0/24", &group_224);
+ first = 0;
+ }
+
+ group.family = AF_INET;
+ group.u.prefix4 = group_addr;
+ group.prefixlen = 32;
+
+ return prefix_match (&group_224, &group);
+}
+
int
pim_is_group_224_4 (struct in_addr group_addr)
{
void pim_pkt_dump(const char *label, const uint8_t *buf, int size);
+int pim_is_group_224_0_0_0_24 (struct in_addr group_addr);
int pim_is_group_224_4 (struct in_addr group_addr);
#endif /* PIM_UTIL_H */