File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ void VlanMgr::doVlanTask(Consumer &consumer)
230230 /*
231231 * TODO: support host VLAN mtu setting.
232232 * Host VLAN mtu should be set only after member configured
233- * and VLAN state is not UNKOWN .
233+ * and VLAN state is not UNKNOWN .
234234 */
235235 SWSS_LOG_DEBUG (" %s mtu %u: Host VLAN mtu setting to be supported." , key.c_str (), mtu);
236236 fvVector.push_back (i);
Original file line number Diff line number Diff line change @@ -44,14 +44,19 @@ int main(int argc, char **argv)
4444
4545 SWSS_LOG_NOTICE (" --- Starting vlanmgrd ---" );
4646
47- string mac_str;
48- stringstream cmd;
49- cmd << IP_CMD << " link show eth0 | " << GREP_CMD << " ether | " << AWK_CMD << " '{print $2}'" ;
50- EXEC_WITH_ERROR_THROW (cmd.str (), mac_str);
51- gMacAddress = mac_str;
52-
5347 try
5448 {
49+ /*
50+ * swss service starts after interfaces-config.service which will have
51+ * switch_mac set.
52+ * Dynamic switch_mac update is not supported for now.
53+ */
54+ string switch_mac_str;
55+ stringstream cmd;
56+ cmd << REDIS_CLI_CMD << " -n " << CONFIG_DB << " hget " << " \" SWITCH|SWITCH_ATTR\" " << " switch_mac" ;
57+ EXEC_WITH_ERROR_THROW (cmd.str (), switch_mac_str);
58+ gMacAddress = MacAddress (switch_mac_str);
59+
5560 vector<string> cfg_vlan_tables = {
5661 CFG_VLAN_TABLE_NAME,
5762 CFG_VLAN_MEMBER_TABLE_NAME,
You can’t perform that action at this time.
0 commit comments