Skip to content

Commit 6cf834c

Browse files
stepanblyschakyxieca
authored andcommitted
[portsorch] fix bug in initializePort (#753)
setHostIntfsOperStatus accepts bool instead of sai_oper_status_t Signed-off-by: Stepan Blyschak <[email protected]>
1 parent 947998b commit 6cf834c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

orchagent/portsorch.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2380,7 +2380,8 @@ bool PortsOrch::initializePort(Port &port)
23802380
/*
23812381
* always initialize Port SAI_HOSTIF_ATTR_OPER_STATUS based on oper_status value in appDB.
23822382
*/
2383-
if (!setHostIntfsOperStatus(port, port.m_oper_status))
2383+
bool isUp = port.m_oper_status == SAI_PORT_OPER_STATUS_UP;
2384+
if (!setHostIntfsOperStatus(port, isUp))
23842385
{
23852386
SWSS_LOG_WARN("Failed to set operation status %s to host interface %s",
23862387
operStatus.c_str(), port.m_alias.c_str());

0 commit comments

Comments
 (0)