Skip to content

[vlanmgr]Fix modify VLAN mac Bridge mac also be modified. #2581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cfgmgr/vlanmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ bool VlanMgr::setHostVlanMac(int vlan_id, const string &mac)
// The command should be generated as:
// /sbin/ip link set Vlan{{vlan_id}} address {{mac}}
ostringstream cmds;
cmds << IP_CMD " link set " VLAN_PREFIX + std::to_string(vlan_id) + " address " << shellquote(mac) << " && "
IP_CMD " link set " DOT1Q_BRIDGE_NAME " address " << shellquote(mac);
cmds << IP_CMD " link set " VLAN_PREFIX + std::to_string(vlan_id) + " address " << shellquote(mac);

std::string res;
EXEC_WITH_ERROR_THROW(cmds.str(), res);
Expand Down