Skip to content

Commit

Permalink
[crmorch]: neighbor used counter increased twice (#472) (#501)
Browse files Browse the repository at this point in the history
* [crmorch]: neighbor used counter increased twice
  • Loading branch information
MaxPolovyi authored and prsunny committed May 14, 2018
1 parent c374357 commit 43365f3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions orchagent/neighorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,16 @@ bool NeighOrch::addNeighbor(NeighborEntry neighborEntry, MacAddress macAddress)
}
m_intfsOrch->decreaseRouterIntfsRefCount(alias);

return false;
}
if (neighbor_entry.ip_address.addr_family == SAI_IP_ADDR_FAMILY_IPV4)
{
gCrmOrch->decCrmResUsedCounter(CrmResourceType::CRM_IPV4_NEIGHBOR);
}
else
{
gCrmOrch->decCrmResUsedCounter(CrmResourceType::CRM_IPV6_NEIGHBOR);
}

if (neighbor_entry.ip_address.addr_family == SAI_IP_ADDR_FAMILY_IPV4)
{
gCrmOrch->incCrmResUsedCounter(CrmResourceType::CRM_IPV4_NEIGHBOR);
}
else
{
gCrmOrch->incCrmResUsedCounter(CrmResourceType::CRM_IPV6_NEIGHBOR);
return false;
}
}
else
Expand Down

0 comments on commit 43365f3

Please sign in to comment.