Skip to content

Commit

Permalink
[macsec] Fix acl entry id in updateMACsecPort (sonic-net#1783)
Browse files Browse the repository at this point in the history
* Fix acl entry id in updateMACsecPort

* Extra fix to calling setMACsecFlowActive
  • Loading branch information
byu343 authored and raphaelt-nvidia committed Oct 5, 2021
1 parent d269277 commit e14a6fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions orchagent/macsecorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1106,13 +1106,13 @@ bool MACsecOrch::updateMACsecPort(MACsecPort &macsec_port, const TaskArgs &port_
SWSS_LOG_WARN("Cannot change the ACL entry action from packet action to MACsec flow");
return false;
}
auto an = macsec_sc->m_encoding_an;
auto entry_id = macsec_sc->m_entry_id;
auto flow_id = macsec_sc->m_flow_id;
recover.add_action([this, an, flow_id]() { this->setMACsecFlowActive(an, flow_id, false); });
recover.add_action([this, entry_id, flow_id]() { this->setMACsecFlowActive(entry_id, flow_id, false); });
}
else
{
setMACsecFlowActive(macsec_sc->m_encoding_an, macsec_sc->m_flow_id, false);
setMACsecFlowActive(macsec_sc->m_entry_id, macsec_sc->m_flow_id, false);
}
}
}
Expand Down Expand Up @@ -1696,7 +1696,7 @@ task_process_status MACsecOrch::createMACsecSA(
}
recover.add_action([this, sc]() {
this->setMACsecFlowActive(
sc->m_encoding_an,
sc->m_entry_id,
sc->m_flow_id,
false);
});
Expand Down

0 comments on commit e14a6fc

Please sign in to comment.