summaryrefslogtreecommitdiffstats
path: root/pimd/pim_util.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-12-02 18:48:06 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-22 02:26:18 +0100
commit06d1c450f355efa63dfe0cbe835db6d58ebb2672 (patch)
tree6a3d899f73c6607ab7323489f3bfc673522a8b56 /pimd/pim_util.c
parentpimd: Fix 'no ip igmp query-max-response-time XX' to work (diff)
downloadfrr-06d1c450f355efa63dfe0cbe835db6d58ebb2672.tar.xz
frr-06d1c450f355efa63dfe0cbe835db6d58ebb2672.zip
pimd: With igmpv2 turned on don't accept 224.0.0.0/24 groups
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:
Diffstat (limited to 'pimd/pim_util.c')
-rw-r--r--pimd/pim_util.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/pimd/pim_util.c b/pimd/pim_util.c
index 087101e1a..1b1b5ef8f 100644
--- a/pimd/pim_util.c
+++ b/pimd/pim_util.c
@@ -107,6 +107,26 @@ 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)
+{
+ 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)
{
static int first = 1;