Skip to content

Commit

Permalink
[crmorch]: neighbor used counter increased twice (sonic-net#472)
Browse files Browse the repository at this point in the history
* [crmorch]: neighbor used counter increased twice
  • Loading branch information
tylerlinp authored and prsunny committed Apr 17, 2018
1 parent 880c1e9 commit 57c9425
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 57c9425

Please sign in to comment.