BugLink: http://bugs.launchpad.net/bugs/613796
The following commit propagated a change to ndiswrapper which originated
from upstream to convert multicast list to list_head.
commit
e2fce7c6af6e1bcd2f577304a5200738d076d98f
Author: Leann Ogasawara <leann.ogasawara@canonical.com>
Date: Thu Jun 3 13:34:15 2010 -0700
UBUNTU: SAUCE: ndiswrapper: convert multicast list to list_head
In making the change we accidentally forgot to carry forward
initialization of a buffer index and properly check its value. Add this
missing functionality which previously existed.
We should squash this patch with commit
e2fce7c6a upon the next rebase.
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
WARNING("couldn't allocate memory");
EXIT2(return);
}
+ i = 0;
netdev_for_each_mc_addr(ha, net_dev) {
+ if (i >= size)
+ break;
if (net_dev->addr_len != ETH_ALEN)
continue;
memcpy(buf + i * ETH_ALEN, ha->addr, ETH_ALEN);