Skip to content

Commit 4ea3d73

Browse files
iris00522lukasstockner
authored andcommitted
Backport fix for VXLAN tunnel status update (sonic-net#2080)
1 parent a2f1428 commit 4ea3d73

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

orchagent/portsorch.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -6013,7 +6013,9 @@ bool PortsOrch::addTunnel(string tunnel_alias, sai_object_id_t tunnel_id, bool h
60136013
{
60146014
tunnel.m_learn_mode = "disable";
60156015
}
6016+
tunnel.m_oper_status = SAI_PORT_OPER_STATUS_DOWN;
60166017
m_portList[tunnel_alias] = tunnel;
6018+
saiOidToAlias[tunnel_id] = tunnel_alias;
60176019

60186020
SWSS_LOG_INFO("addTunnel:: %" PRIx64, tunnel_id);
60196021

@@ -6024,6 +6026,7 @@ bool PortsOrch::removeTunnel(Port tunnel)
60246026
{
60256027
SWSS_LOG_ENTER();
60266028

6029+
saiOidToAlias.erase(tunnel.m_tunnel_id);
60276030
m_portList.erase(tunnel.m_alias);
60286031

60296032
return true;
@@ -6790,7 +6793,7 @@ void PortsOrch::updatePortOperStatus(Port &port, sai_port_oper_status_t status)
67906793
return;
67916794
}
67926795

6793-
if (port.m_type == Port::PHY)
6796+
if (port.m_type == Port::PHY || port.m_type == Port::TUNNEL)
67946797
{
67956798
updateDbPortOperStatus(port, status);
67966799
updateGearboxPortOperStatus(port);

0 commit comments

Comments
 (0)