Skip to content

Commit

Permalink
team: team should sync the port's uc/mc addrs when add a port
Browse files Browse the repository at this point in the history
There is an issue when we use mavtap over team:
When we replug nic links from team0, the real nics's mc list will not
include the maddr for macvtap any more. then we can't receive pkts to
macvtap device, as they are filterred by mc list of nic.

In Bonding Driver, it syncs the uc/mc addrs in bond_enslave().

We will fix this issue on team by adding the port's uc/mc addrs sync in
team_port_add.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Xin Long authored and David S. Miller committed Mar 30, 2016
1 parent c348338 commit cb41c99
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,9 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
goto err_dev_open;
}

dev_uc_sync_multiple(port_dev, dev);
dev_mc_sync_multiple(port_dev, dev);

err = vlan_vids_add_by_dev(port_dev, dev);
if (err) {
netdev_err(dev, "Failed to add vlan ids to device %s\n",
Expand Down Expand Up @@ -1261,6 +1264,8 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
vlan_vids_del_by_dev(port_dev, dev);

err_vids_add:
dev_uc_unsync(port_dev, dev);
dev_mc_unsync(port_dev, dev);
dev_close(port_dev);

err_dev_open:
Expand Down

0 comments on commit cb41c99

Please sign in to comment.