Skip to content

Commit

Permalink
[mirrororch]: Fix bug when no need to update session type (sonic-net#648
Browse files Browse the repository at this point in the history
)

* [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 <[email protected]>
  • Loading branch information
Shuotian Cheng authored and lguohan committed Oct 22, 2018
1 parent 4bf28ed commit 3d4bed1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion orchagent/mirrororch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3d4bed1

Please sign in to comment.