Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64540
b: refs/heads/master
c: aaa53c4
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Thery authored and David S. Miller committed Aug 27, 2007
1 parent 68712a1 commit 6d3aa51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: f424bb9efaee90b752aabcb4e5e95920ee9580bb
refs/heads/master: aaa53c4aba14f14de06419a20e552fe2d8823a33
14 changes: 10 additions & 4 deletions trunk/net/core/dev_mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
*/
int dev_mc_sync(struct net_device *to, struct net_device *from)
{
struct dev_addr_list *da;
struct dev_addr_list *da, *next;
int err = 0;

netif_tx_lock_bh(to);
for (da = from->mc_list; da != NULL; da = da->next) {
da = from->mc_list;
while (da != NULL) {
next = da->next;
if (!da->da_synced) {
err = __dev_addr_add(&to->mc_list, &to->mc_count,
da->da_addr, da->da_addrlen, 0);
Expand All @@ -134,6 +136,7 @@ int dev_mc_sync(struct net_device *to, struct net_device *from)
__dev_addr_delete(&from->mc_list, &from->mc_count,
da->da_addr, da->da_addrlen, 0);
}
da = next;
}
if (!err)
__dev_set_rx_mode(to);
Expand All @@ -156,19 +159,22 @@ EXPORT_SYMBOL(dev_mc_sync);
*/
void dev_mc_unsync(struct net_device *to, struct net_device *from)
{
struct dev_addr_list *da;
struct dev_addr_list *da, *next;

netif_tx_lock_bh(from);
netif_tx_lock_bh(to);

for (da = from->mc_list; da != NULL; da = da->next) {
da = from->mc_list;
while (da != NULL) {
next = da->next;
if (!da->da_synced)
continue;
__dev_addr_delete(&to->mc_list, &to->mc_count,
da->da_addr, da->da_addrlen, 0);
da->da_synced = 0;
__dev_addr_delete(&from->mc_list, &from->mc_count,
da->da_addr, da->da_addrlen, 0);
da = next;
}
__dev_set_rx_mode(to);

Expand Down

0 comments on commit 6d3aa51

Please sign in to comment.