From 15a2299367931e8fddff49256bc7bea75dd3f3a3 Mon Sep 17 00:00:00 2001 From: Shuotian Cheng Date: Thu, 1 Nov 2018 15:03:47 -0700 Subject: [PATCH] [vlanmgrd]: Do not bring up VLAN members by default (#667) VLAN members' admin status and MTU are controlled by portmdrd. vlanmgrd shall not bring up and set MTU automatically by default. Signed-off-by: Shu0T1an ChenG --- cfgmgr/vlanmgr.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cfgmgr/vlanmgr.cpp b/cfgmgr/vlanmgr.cpp index bed88c19ced8..71d6c33f9e44 100644 --- a/cfgmgr/vlanmgr.cpp +++ b/cfgmgr/vlanmgr.cpp @@ -169,13 +169,11 @@ bool VlanMgr::addHostVlanMember(int vlan_id, const string &port_alias, const str // The command should be generated as: // /bin/bash -c "/sbin/ip link set {{port_alias}} master Bridge && - // /sbin/bridge vlan add vid {{vlan_id}} dev {{port_alias}} {{tagging_mode}} - // /sbin/ip link set {{port_alias}} up mtu 9100" + // /sbin/bridge vlan add vid {{vlan_id}} dev {{port_alias}} {{tagging_mode}}" const std::string cmds = std::string("") + BASH_CMD + " -c \"" + IP_CMD + " link set " + port_alias + " master " + DOT1Q_BRIDGE_NAME + " && " - + BRIDGE_CMD + " vlan add vid " + std::to_string(vlan_id) + " dev " + port_alias + " " + tagging_cmd + " && " - + IP_CMD + " link set " + port_alias + " up mtu " + std::to_string(MAX_MTU) + "\""; + + BRIDGE_CMD + " vlan add vid " + std::to_string(vlan_id) + " dev " + port_alias + " " + tagging_cmd + "\""; std::string res; EXEC_WITH_ERROR_THROW(cmds, res);