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 zhenggen-xu committed May 19, 2018
1 parent 40a93b3 commit 2b01005
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 @@ -413,16 +413,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 2b01005

Please sign in to comment.