Skip to content

Commit f1c0a75

Browse files
authored
Update FDB state table when , MAC entries are modified as dynamic_local. (#2575)
* Update FDB state table when , MAC entries are modified as dynamic_local. * commit to trigger build again.
1 parent beaac71 commit f1c0a75

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

orchagent/fdborch.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,11 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
14621462
{
14631463
//If the MAC is dynamic_local change the origin accordingly
14641464
//MAC is added/updated as dynamic to allow aging.
1465+
SWSS_LOG_INFO("MAC-Update Modify to dynamic FDB %s in %s on from-%s:to-%s from-%s:to-%s origin-%d-to-%d",
1466+
entry.mac.to_string().c_str(), vlan.m_alias.c_str(), oldPort.m_alias.c_str(),
1467+
port_name.c_str(), oldType.c_str(), fdbData.type.c_str(),
1468+
oldOrigin, fdbData.origin);
1469+
14651470
storeFdbData.origin = FDB_ORIGIN_LEARN;
14661471
storeFdbData.type = "dynamic";
14671472
}
@@ -1470,8 +1475,10 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
14701475

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

1473-
if ((fdbData.origin != FDB_ORIGIN_MCLAG_ADVERTIZED) &&
1474-
(fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED))
1478+
if (((fdbData.origin != FDB_ORIGIN_MCLAG_ADVERTIZED) &&
1479+
(fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED)) ||
1480+
((fdbData.origin == FDB_ORIGIN_MCLAG_ADVERTIZED) &&
1481+
(fdbData.type == "dynamic_local")))
14751482
{
14761483
/* State-DB is updated only for Local Mac addresses */
14771484
// Write to StateDb

0 commit comments

Comments
 (0)