From 3d4bed11a8acb9f4d9df113f3086148d5b13ed87 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Mon, 22 Oct 2018 15:14:05 -0700 Subject: [PATCH] [mirrororch]: Fix bug when no need to update session type (#648) * [mirrororch]: Fix bug when no need to update session type When the destination port type is not VLAN related, there is no need to update the session type. Signed-off-by: Shu0T1an ChenG --- orchagent/mirrororch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/orchagent/mirrororch.cpp b/orchagent/mirrororch.cpp index aaa65b795f9f..488b8d4efd73 100644 --- a/orchagent/mirrororch.cpp +++ b/orchagent/mirrororch.cpp @@ -424,7 +424,9 @@ bool MirrorOrch::updateSession(const string& name, MirrorEntry& session) if (session.status) { if (old_session.neighborInfo.port.m_type != - session.neighborInfo.port.m_type) + session.neighborInfo.port.m_type && + (old_session.neighborInfo.port.m_type == Port::VLAN || + session.neighborInfo.port.m_type == Port::VLAN)) { ret &= updateSessionType(name, session); }