Skip to content

Commit

Permalink
Revert "Fixed ACL IP type parser" (#762)
Browse files Browse the repository at this point in the history
* Revert "Fixed ACL IP type parser. (#715)"

This reverts commit fd2eb4b.
  • Loading branch information
prsunny committed Jan 18, 2019
1 parent 5119b08 commit 230086b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions orchagent/aclorch.cpp
Expand Up @@ -216,11 +216,13 @@ bool AclRule::validateAddMatch(string attr_name, string attr_value)
}
else if (attr_name == MATCH_IP_TYPE)
{
if (!processIpType(attr_value, value.aclfield.data.s32))
if (!processIpType(attr_value, value.aclfield.data.u32))
{
SWSS_LOG_ERROR("Invalid IP type %s", attr_value.c_str());
return false;
}

value.aclfield.mask.u32 = 0xFFFFFFFF;
}
else if (attr_name == MATCH_TCP_FLAGS)
{
Expand Down Expand Up @@ -363,7 +365,7 @@ bool AclRule::validateAddMatch(string attr_name, string attr_value)
return true;
}

bool AclRule::processIpType(string type, sai_int32_t &ip_type)
bool AclRule::processIpType(string type, sai_uint32_t &ip_type)
{
SWSS_LOG_ENTER();

Expand Down
2 changes: 1 addition & 1 deletion orchagent/aclorch.h
Expand Up @@ -164,7 +164,7 @@ class AclRule
virtual bool validateAddMatch(string attr_name, string attr_value);
virtual bool validateAddAction(string attr_name, string attr_value) = 0;
virtual bool validate() = 0;
bool processIpType(string type, sai_int32_t &ip_type);
bool processIpType(string type, sai_uint32_t &ip_type);
inline static void setRulePriorities(sai_uint32_t min, sai_uint32_t max)
{
m_minPriority = min;
Expand Down

0 comments on commit 230086b

Please sign in to comment.