Skip to content

Commit

Permalink
[orchagent] Do not restore port admin if port admin is configured
Browse files Browse the repository at this point in the history
Issue:
The pCfg.admin_status might be overridden by prior configurations.

Solution:
Only restore port admin if port admin is not configured.
  • Loading branch information
PJHsieh committed Jan 8, 2025
1 parent c20902f commit 3d57dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4692,7 +4692,7 @@ void PortsOrch::doPortTask(Consumer &consumer)
initializePortOperErrors(p);

// Restore admin status if the port was brought down
if (admin_status != p.m_admin_state_up)
if (admin_status != p.m_admin_state_up && pCfg.admin_status.is_set == false)
{
pCfg.admin_status.is_set = true;
pCfg.admin_status.value = admin_status;
Expand Down

0 comments on commit 3d57dd8

Please sign in to comment.