Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202205][cherry-pick] Fix mux_acl_rule adding issue #2358

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3694,7 +3694,14 @@ bool AclOrch::addAclTable(AclTable &newTable)
return true;
}
}

// Update matching field according to ACL stage
newTable.addStageMandatoryMatchFields();

// Add mandatory ACL action if not present
// We need to call addMandatoryActions here because addAclTable is directly called in other orchs.
// The action_list is already added if the ACL table creation is triggered by CONFIGDD, but calling addMandatoryActions
// twice will make no effect
newTable.addMandatoryActions();
if (createBindAclTable(newTable, table_oid))
{
m_AclTables[table_oid] = newTable;
Expand Down Expand Up @@ -4171,11 +4178,8 @@ void AclOrch::doAclTableTask(Consumer &consumer)
}

newTable.validateAddType(*tableType);

newTable.addStageMandatoryMatchFields();

// Add mandatory ACL action if not present
newTable.addMandatoryActions();

// validate and create/update ACL Table
if (bAllAttributesOk && newTable.validate())
{
Expand Down