Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mlag]Fix dynamic local fdb not save to state db #1932

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
9 changes: 6 additions & 3 deletions orchagent/fdborch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1392,8 +1392,7 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,

string key = "Vlan" + to_string(vlan.m_vlan_info.vlan_id) + ":" + entry.mac.to_string();

if ((fdbData.origin != FDB_ORIGIN_MCLAG_ADVERTIZED) &&
(fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED))
if (dbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED)
{
/* State-DB is updated only for Local Mac addresses */
// Write to StateDb
Expand All @@ -1403,7 +1402,11 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
fvs.push_back(FieldValueTuple("type", "dynamic"));
else
fvs.push_back(FieldValueTuple("type", fdbData.type));
m_fdbStateTable.set(key, fvs);
if(fdbData.origin != FDB_ORIGIN_MCLAG_ADVERTIZED ||
pettershao-ragilenetworks marked this conversation as resolved.
Show resolved Hide resolved
fdbData.type == "dynamic_local")
{
m_fdbStateTable.set(key, fvs);
}
}

else if (macUpdate && (oldOrigin != FDB_ORIGIN_MCLAG_ADVERTIZED) &&
Expand Down