diff --git a/meta/saisanitycheck.c b/meta/saisanitycheck.c index 33a6a2761..cec767120 100644 --- a/meta/saisanitycheck.c +++ b/meta/saisanitycheck.c @@ -763,6 +763,14 @@ void check_attr_default_required( } } + if (md->objecttype == SAI_OBJECT_TYPE_PORT) + { + /* + * Allow PORT non object list attributes to be set to internal switch values. + */ + break; + } + if (md->defaultvalue == NULL) { META_MD_ASSERT_FAIL(md, "default value type is provided, but default value pointer is NULL"); @@ -867,6 +875,14 @@ void check_attr_default_required( case SAI_ATTR_VALUE_TYPE_IP_ADDRESS_LIST: case SAI_ATTR_VALUE_TYPE_PORT_EYE_VALUES_LIST: + if (md->objecttype == SAI_OBJECT_TYPE_PORT && md->defaultvaluetype == SAI_DEFAULT_VALUE_TYPE_SWITCH_INTERNAL) + { + /* + * Allow non object lists on PORT to be set to internal default value. + */ + break; + } + if (md->defaultvaluetype == SAI_DEFAULT_VALUE_TYPE_EMPTY_LIST) { break; @@ -1074,6 +1090,14 @@ void check_attr_default_value_type( case SAI_DEFAULT_VALUE_TYPE_SWITCH_INTERNAL: + if (md->objecttype == SAI_OBJECT_TYPE_PORT) + { + /* + * Allow PORT attribute list's to be set to internal. + */ + break; + } + if (md->flags != SAI_ATTR_FLAGS_READ_ONLY) { META_MD_ASSERT_FAIL(md, "default internal currently can be set only on read only objects");