diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 4d5d39e017fe..3f47cb38730b 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -1036,6 +1036,12 @@ bool AclRuleL3V6::validateAddMatch(string attr_name, string attr_value) return false; } + if (attr_name == MATCH_ETHER_TYPE) + { + SWSS_LOG_ERROR("Ethertype match is not supported for table type L3V6"); + return false; + } + return AclRule::validateAddMatch(attr_name, attr_value); } @@ -1356,7 +1362,7 @@ bool AclTable::create() return status == SAI_STATUS_SUCCESS; } - if (type != ACL_TABLE_MIRRORV6) + if (type != ACL_TABLE_MIRRORV6 && type != ACL_TABLE_L3V6) { attr.id = SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE; attr.value.booldata = true; diff --git a/tests/mock_tests/aclorch_ut.cpp b/tests/mock_tests/aclorch_ut.cpp index 65c1862e8c35..cc0ca8941f68 100644 --- a/tests/mock_tests/aclorch_ut.cpp +++ b/tests/mock_tests/aclorch_ut.cpp @@ -388,7 +388,6 @@ namespace aclorch_test vector fields; fields.push_back({ "SAI_ACL_TABLE_ATTR_ACL_BIND_POINT_TYPE_LIST", "2:SAI_ACL_BIND_POINT_TYPE_PORT,SAI_ACL_BIND_POINT_TYPE_LAG" }); - fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE", "true" }); fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ACL_IP_TYPE", "true" }); fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_IP_PROTOCOL", "true" }); @@ -400,6 +399,7 @@ namespace aclorch_test switch (acl_table.type) { case ACL_TABLE_L3: + fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE", "true" }); fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_SRC_IP", "true" }); fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_DST_IP", "true" }); break; @@ -898,7 +898,7 @@ namespace aclorch_test // // Using fixed ports = {"1,2"} for now. // The bind operations will be another separately test cases. - TEST_F(AclOrchTest, ACL_Creation_and_Destorying) + TEST_F(AclOrchTest, ACL_Creation_and_Destruction) { auto orch = createAclOrch();