lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Mar 2009 15:55:07 +0100
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: Add support for the OpenCores 10/100 Mbps
	Ethernet MAC.

* Andrey Panin wrote:
> On 083, 03 24, 2009 at 11:18:43AM +0100, Thierry Reding wrote:
[snip]
> > +static int ethoc_get_multicast_bit(struct dev_mc_list *mc)
> > +{
> > +	u32 crc = 0xffffffff;
> > +	u32 carry;
> > +	int i, j;
> > +
> > +	for (i = 0; i < mc->dmi_addrlen; i++) {
> > +		u8 byte = mc->dmi_addr[i];
> > +
> > +		for (j = 0; j < 8; j++) {
> > +			carry = ((crc & 0x80000000) ? 1 : 0) ^ (byte & 0x1);
> > +			byte >>= 1;
> > +			crc <<= 1;
> > +
> > +			if (carry)
> > +				crc = (crc ^ 0x04c11db6) | carry;
> > +		}
> > +	}
> 
> This looks like yet another crc32 implementation, consider using ether_crc_le()
[snip]

Yes, ether_crc() does the trick. See follow-up patch. Thanks.

Cheers,
Thierry

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ