提交 e9671fcb 编写于 作者: J Joe Perches 提交者: David S. Miller

[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: NDavid S. Miller <davem@davemloft.net>
上级 03f49f34
...@@ -168,13 +168,13 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from) ...@@ -168,13 +168,13 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from)
da = from->mc_list; da = from->mc_list;
while (da != NULL) { while (da != NULL) {
next = da->next; next = da->next;
if (!da->da_synced) if (da->da_synced) {
continue;
__dev_addr_delete(&to->mc_list, &to->mc_count, __dev_addr_delete(&to->mc_list, &to->mc_count,
da->da_addr, da->da_addrlen, 0); da->da_addr, da->da_addrlen, 0);
da->da_synced = 0; da->da_synced = 0;
__dev_addr_delete(&from->mc_list, &from->mc_count, __dev_addr_delete(&from->mc_list, &from->mc_count,
da->da_addr, da->da_addrlen, 0); da->da_addr, da->da_addrlen, 0);
}
da = next; da = next;
} }
__dev_set_rx_mode(to); __dev_set_rx_mode(to);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册