From 2cb70a320173a44a4b1e2006cc45ee658f03d83e Mon Sep 17 00:00:00 2001 From: Nikola Dancejic <26731235+Ndancejic@users.noreply.github.com> Date: Tue, 9 Aug 2022 09:24:39 -0700 Subject: [PATCH] [muxorch] return true if the nbr IP is in the skip_neighbors list (#2407) Orchagent was not programming neighbor IP to h/w L3 host table during initialization because they were set as Standby. When the links became active, SoC IPs were added to the skip_neighbors_ list and never programmed. fix: - Added public method MuxCable::getSkipNeighborsSet() - check if nbr is in skip_neighbors_ when checking if cable is Active Signed-off-by: Nikola Dancejic Co-authored-by: Ubuntu --- orchagent/muxorch.cpp | 4 ++++ orchagent/muxorch.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/orchagent/muxorch.cpp b/orchagent/muxorch.cpp index 6770a4defb..baa0495a60 100644 --- a/orchagent/muxorch.cpp +++ b/orchagent/muxorch.cpp @@ -962,6 +962,10 @@ 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(); } diff --git a/orchagent/muxorch.h b/orchagent/muxorch.h index 011d61b924..c9b09fd823 100644 --- a/orchagent/muxorch.h +++ b/orchagent/muxorch.h @@ -97,6 +97,10 @@ class MuxCable { return nbr_handler_->getNextHopId(nh); } + std::set getSkipNeighborsSet() + { + return skip_neighbors_; + } private: bool stateActive();