aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-11-11 00:36:04 -0500
committerDavid S. Miller <davem@davemloft.net>2007-11-11 00:36:04 -0500
commite9671fcb3bef1fe2e71aa0456bd5b7eec9e8de4d (patch)
treea90b0faa96659acb47468cba910311e370158980
parent03f49f345749abc08bc84b835433c94eea6e972b (diff)
[NET]: Fix infinite loop in dev_mc_unsync().
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>
-rw-r--r--net/core/dev_mcast.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index ae354057d84..647973daca2 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -168,13 +168,13 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from)
168 da = from->mc_list; 168 da = from->mc_list;
169 while (da != NULL) { 169 while (da != NULL) {
170 next = da->next; 170 next = da->next;
171 if (!da->da_synced) 171 if (da->da_synced) {
172 continue; 172 __dev_addr_delete(&to->mc_list, &to->mc_count,
173 __dev_addr_delete(&to->mc_list, &to->mc_count, 173 da->da_addr, da->da_addrlen, 0);
174 da->da_addr, da->da_addrlen, 0); 174 da->da_synced = 0;
175 da->da_synced = 0; 175 __dev_addr_delete(&from->mc_list, &from->mc_count,
176 __dev_addr_delete(&from->mc_list, &from->mc_count, 176 da->da_addr, da->da_addrlen, 0);
177 da->da_addr, da->da_addrlen, 0); 177 }
178 da = next; 178 da = next;
179 } 179 }
180 __dev_set_rx_mode(to); 180 __dev_set_rx_mode(to);