Skip to content

Commit

Permalink
[NET]: Fix infinite loop in dev_mc_unsync().
Browse files Browse the repository at this point in the history
From: Joe Perches <joe@perches.com>

Based upon an initial patch and report by Luis R. Rodriguez.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Nov 11, 2007
1 parent 03f49f3 commit e9671fc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions net/core/dev_mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from)
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);
if (da->da_synced) {
__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 e9671fc

Please sign in to comment.