lkml.org 
[lkml]   [2004]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [BUG 2.2/2.4/2.6] broken memsets in net/sk_mca.c (multicast)
Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> Erm...

--- 25/drivers/net/sk_mca.c~sk_mca-multicast-fix 2004-04-10 01:42:29.464928112 -0700
+++ 25-akpm/drivers/net/sk_mca.c 2004-04-10 01:57:20.106530008 -0700
@@ -997,13 +997,13 @@ static void skmca_set_multicast_list(str
block.Mode &= ~LANCE_INIT_PROM;

if (dev->flags & IFF_ALLMULTI) { /* get all multicasts */
- memset(block.LAdrF, 8, 0xff);
+ memset(block.LAdrF, 0xff, sizeof(block.LAdrF));
} else { /* get selected/no multicasts */

struct dev_mc_list *mptr;
int code;

- memset(block.LAdrF, 8, 0x00);
+ memset(block.LAdrF, 0, sizeof(block.LAdrF));
for (mptr = dev->mc_list; mptr != NULL; mptr = mptr->next) {
code = GetHash(mptr->dmi_addr);
block.LAdrF[(code >> 3) & 7] |= 1 << (code & 7);
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.035 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site