From 230086bd497976cfd4827c34fdf41671059ba17e Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Thu, 17 Jan 2019 17:59:19 -0800 Subject: [PATCH] Revert "Fixed ACL IP type parser" (#762) * Revert "Fixed ACL IP type parser. (#715)" This reverts commit fd2eb4b1c1fdfaceed0925bf5371edc6a700d545. --- orchagent/aclorch.cpp | 6 ++++-- orchagent/aclorch.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 11f6472d2370..dd138d16f81d 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -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) { @@ -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(); diff --git a/orchagent/aclorch.h b/orchagent/aclorch.h index 44fc257edeb2..5d609dac4e69 100644 --- a/orchagent/aclorch.h +++ b/orchagent/aclorch.h @@ -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;