diff --git a/src/ucentral-client/include/ucentral-platform.h b/src/ucentral-client/include/ucentral-platform.h index aebf73b..1e2c5cc 100644 --- a/src/ucentral-client/include/ucentral-platform.h +++ b/src/ucentral-client/include/ucentral-platform.h @@ -388,6 +388,8 @@ struct plat_unit_system_cfg { struct plat_unit { struct plat_unit_poe_cfg poe; struct plat_unit_system_cfg system; + bool mc_flood_control; + bool querier_enable; }; enum plat_stp_mode { diff --git a/src/ucentral-client/platform/brcm-sonic/plat-gnma.c b/src/ucentral-client/platform/brcm-sonic/plat-gnma.c index 864837c..f5e39c2 100644 --- a/src/ucentral-client/platform/brcm-sonic/plat-gnma.c +++ b/src/ucentral-client/platform/brcm-sonic/plat-gnma.c @@ -4398,6 +4398,11 @@ static int config_unit_apply(struct plat_cfg *cfg) gnma_poe_power_mgmt_mode_t mgmt_mode; int ret; + if (cfg->unit.mc_flood_control || cfg->unit.querier_enable) { + UC_LOG_ERR("'unknown-multicast-flood-control' and 'querier-enable' global configs are not supported\n"); + return -1; + } + __poe_power_mgmt_str2num(cfg->unit.poe.power_mgmt, &mgmt_mode); if (cfg->unit.poe.is_power_mgmt_set && diff --git a/src/ucentral-client/proto.c b/src/ucentral-client/proto.c index fce6e78..b3c9325 100644 --- a/src/ucentral-client/proto.c +++ b/src/ucentral-client/proto.c @@ -1979,8 +1979,10 @@ skip_health_parse: static int cfg_unit_parse(cJSON *unit, struct plat_cfg *cfg) { cJSON *usage_threshold; + cJSON *flood_control; cJSON *power_mgmt; cJSON *password; + cJSON *querier; cJSON *poe; if ((poe = cJSON_GetObjectItemCaseSensitive(unit, "poe"))) { @@ -2005,6 +2007,12 @@ static int cfg_unit_parse(cJSON *unit, struct plat_cfg *cfg) cfg->unit.system.password_changed = true; } + if ((flood_control = cJSON_GetObjectItemCaseSensitive(unit, "unknown-multicast-flood-control"))) + cfg->unit.mc_flood_control = cJSON_IsTrue(flood_control); + + if ((querier = cJSON_GetObjectItemCaseSensitive(unit, "querier-enable"))) + cfg->unit.querier_enable = cJSON_IsTrue(querier); + return 0; }