diff --git a/orchagent/intfsorch.cpp b/orchagent/intfsorch.cpp index 4ee5850a2d..f638d89acb 100644 --- a/orchagent/intfsorch.cpp +++ b/orchagent/intfsorch.cpp @@ -1078,7 +1078,10 @@ void IntfsOrch::doTask(Consumer &consumer) if (!mac) { - mac = gMacAddress; + // Prefer the port's own MAC (e.g. a VLAN SVI's gateway MAC populated + // from VLAN_TABLE) and only fall back to the switch MAC when the port + // has none. + mac = port.m_mac ? port.m_mac : gMacAddress; } // update mac if it is changed