Skip to content

Commit

Permalink
[aclorch]: Fix ACL range attribute enabling (sonic-net#197)
Browse files Browse the repository at this point in the history
* Moved ACL attributes enabling to the rule create function
  • Loading branch information
andriymoroz-mlnx authored and Shuotian Cheng committed Apr 27, 2017
1 parent 93dd3e9 commit 13cc963
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ bool AclRule::validateAddMatch(string attr_name, string attr_value)
return false;
}

value.aclfield.enable = true;
m_matches[aclMatchLookup[attr_name]] = value;

return true;
Expand Down Expand Up @@ -321,6 +320,7 @@ bool AclRule::create()
{
attr.id = it.first;
attr.value = it.second;
attr.value.aclfield.enable = true;
rule_attrs.push_back(attr);
}
}
Expand All @@ -329,6 +329,7 @@ bool AclRule::create()
if (range_object_list.count > 0)
{
attr.id = SAI_ACL_ENTRY_ATTR_FIELD_RANGE;
attr.value.aclfield.enable = true;
attr.value.aclfield.data.objlist = range_object_list;
rule_attrs.push_back(attr);
}
Expand Down

0 comments on commit 13cc963

Please sign in to comment.