Skip to content

Commit

Permalink
[vlanmgrd]: Do not bring up VLAN members by default (sonic-net#667)
Browse files Browse the repository at this point in the history
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 <shuche@microsoft.com>
  • Loading branch information
Shuotian Cheng authored Nov 1, 2018
1 parent 44a4460 commit 15a2299
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cfgmgr/vlanmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 15a2299

Please sign in to comment.