]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Do not allow 224.0.0.0/24 range in igmp join
authorMobashshera Rasool <mrasool@vmware.com>
Fri, 18 Feb 2022 06:03:07 +0000 (22:03 -0800)
committerMobashshera Rasool <mrasool@vmware.com>
Mon, 21 Feb 2022 06:21:31 +0000 (22:21 -0800)
224.0.0.0/24 cannot be used by igmp since this is reserved
for routing protocols and other low-level topology discovery or
maintenance protocols.

Fixes: #10614
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
pimd/pim_nb_config.c

index 3766157295c3923b84784067e203deed27997ae3..8a78489ae0ef166b9653950b2570837754a0a14c 100644 (file)
@@ -31,6 +31,7 @@
 #include "pim_ssm.h"
 #include "pim_ssmpingd.h"
 #include "pim_vxlan.h"
+#include "pim_util.h"
 #include "log.h"
 #include "lib_errors.h"
 
@@ -2833,6 +2834,14 @@ int lib_interface_gmp_address_family_static_group_create(
                                 ifp_name);
                        return NB_ERR_VALIDATION;
                }
+
+               yang_dnode_get_ip(&group_addr, args->dnode, "./group-addr");
+               if (pim_is_group_224_0_0_0_24(group_addr.ip._v4_addr)) {
+                       snprintf(
+                               args->errmsg, args->errmsg_len,
+                               "Groups within 224.0.0.0/24 are reserved and cannot be joined");
+                       return NB_ERR_VALIDATION;
+               }
                break;
        case NB_EV_PREPARE:
        case NB_EV_ABORT: