diff --git a/meta/saisanitycheck.c b/meta/saisanitycheck.c index 92f192d5d..4c1df9a69 100644 --- a/meta/saisanitycheck.c +++ b/meta/saisanitycheck.c @@ -435,6 +435,11 @@ bool sai_metadata_is_acl_field_or_action( { return true; } + + if (metadata->isextensionattr) + { + return true; + } } return false; @@ -1890,8 +1895,13 @@ void check_attr_acl_fields( case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_OBJECT_ID: case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_OBJECT_LIST: - if (md->objecttype != SAI_OBJECT_TYPE_ACL_ENTRY || - md->attrid < SAI_ACL_ENTRY_ATTR_ACTION_START || + if (md->objecttype == SAI_OBJECT_TYPE_ACL_ENTRY && md->isextensionattr) + { + break; + } + + if (md->objecttype != SAI_OBJECT_TYPE_ACL_ENTRY || + md->attrid < SAI_ACL_ENTRY_ATTR_ACTION_START || md->attrid > SAI_ACL_ENTRY_ATTR_ACTION_END) { META_MD_ASSERT_FAIL(md, "acl action may only be set on acl action"); @@ -4112,7 +4122,7 @@ void check_acl_entry_actions() break; } - if (meta->attrid > SAI_ACL_ENTRY_ATTR_ACTION_END) + if ((meta->isextensionattr == false) && (meta->attrid > SAI_ACL_ENTRY_ATTR_ACTION_END)) { break; }