Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions orchagent/muxorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,11 +963,7 @@ bool MuxOrch::isNeighborActive(const IpAddress& nbr, const MacAddress& mac, stri

if (ptr)
{
if (ptr->getSkipNeighborsSet().find(nbr) != ptr->getSkipNeighborsSet().end())
{
return true;
}
return ptr->isActive();
return (ptr->isActive() || ptr->isSkipNeighbor(nbr));
}

string port;
Expand All @@ -981,15 +977,15 @@ bool MuxOrch::isNeighborActive(const IpAddress& nbr, const MacAddress& mac, stri
if (!port.empty() && isMuxExists(port))
{
MuxCable* ptr = getMuxCable(port);
return ptr->isActive();
return (ptr->isActive() || ptr->isSkipNeighbor(nbr));
}

NextHopKey nh_key = NextHopKey(nbr, alias);
string curr_port = getNexthopMuxName(nh_key);
if (port.empty() && !curr_port.empty() && isMuxExists(curr_port))
{
MuxCable* ptr = getMuxCable(curr_port);
return ptr->isActive();
return (ptr->isActive() || ptr->isSkipNeighbor(nbr));
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions orchagent/muxorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class MuxCable
{
return nbr_handler_->getNextHopId(nh);
}
std::set<IpAddress> getSkipNeighborsSet()
bool isSkipNeighbor(const IpAddress& nbr)
{
return skip_neighbors_;
return (skip_neighbors_.find(nbr) != skip_neighbors_.end());
}

private:
Expand Down