From: Mobashshera Rasool Date: Fri, 18 Feb 2022 06:03:07 +0000 (-0800) Subject: pimd: Do not allow 224.0.0.0/24 range in igmp join X-Git-Tag: pim6-testing-20220430~305^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=fcfd479d99295f82ef5979fc74ca38c9787cac2d;p=matthieu%2Ffrr.git pimd: Do not allow 224.0.0.0/24 range in igmp join 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 --- diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index 3766157295..8a78489ae0 100644 --- a/pimd/pim_nb_config.c +++ b/pimd/pim_nb_config.c @@ -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: