Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193636
b: refs/heads/master
c: 32a806c
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Mar 22, 2010
1 parent c0bb5cf commit 9edeb42
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 755d0e77ac9c8d125388922dc33434ed5b2ebe80
refs/heads/master: 32a806c194ea112cfab00f558482dd97bee5e44e
4 changes: 4 additions & 0 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,10 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
goto err_undo_flags;
}

/* Flush unicast and multicast addresses */
dev_unicast_flush(bond_dev);
dev_addr_discard(bond_dev);

if (slave_dev->type != ARPHRD_ETHER)
bond_setup_by_slave(bond_dev, slave_dev);
else
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1994,10 +1994,12 @@ extern int dev_unicast_delete(struct net_device *dev, void *addr);
extern int dev_unicast_add(struct net_device *dev, void *addr);
extern int dev_unicast_sync(struct net_device *to, struct net_device *from);
extern void dev_unicast_unsync(struct net_device *to, struct net_device *from);
extern void dev_unicast_flush(struct net_device *dev);
extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly);
extern int dev_mc_sync(struct net_device *to, struct net_device *from);
extern void dev_mc_unsync(struct net_device *to, struct net_device *from);
extern void dev_addr_discard(struct net_device *dev);
extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all);
extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly);
extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4457,12 +4457,13 @@ void dev_unicast_unsync(struct net_device *to, struct net_device *from)
}
EXPORT_SYMBOL(dev_unicast_unsync);

static void dev_unicast_flush(struct net_device *dev)
void dev_unicast_flush(struct net_device *dev)
{
netif_addr_lock_bh(dev);
__hw_addr_flush(&dev->uc);
netif_addr_unlock_bh(dev);
}
EXPORT_SYMBOL(dev_unicast_flush);

static void dev_unicast_init(struct net_device *dev)
{
Expand All @@ -4484,7 +4485,7 @@ static void __dev_addr_discard(struct dev_addr_list **list)
}
}

static void dev_addr_discard(struct net_device *dev)
void dev_addr_discard(struct net_device *dev)
{
netif_addr_lock_bh(dev);

Expand All @@ -4493,6 +4494,7 @@ static void dev_addr_discard(struct net_device *dev)

netif_addr_unlock_bh(dev);
}
EXPORT_SYMBOL(dev_addr_discard);

/**
* dev_get_flags - get flags reported to userspace
Expand Down

0 comments on commit 9edeb42

Please sign in to comment.