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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1310114109.2755.18.camel@Joe-Laptop>
Date:	Fri, 08 Jul 2011 01:35:09 -0700
From:	Joe Perches <joe@...ches.com>
To:	Tobias Klauser <tklauser@...tanz.ch>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Jaroslav Kysela <perex@...ex.cz>
Subject: Re: [PATCH] drivers/net: Omit check for multicast bit in
 netdev_for_each_mc_addr

On Fri, 2011-07-08 at 10:06 +0200, Tobias Klauser wrote:
> There is no need to check for the address being a multicast address in
> the netdev_for_each_mc_addr loop, so remove it.
> 
> There is no need to check for the address being a multicast address in
> the netdev_for_each_mc_addr loop, so remove it.

Thanks Tobias.

The commit message is a bit redundant, but this looks
good to me.

[]
> diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
[]
> @@ -2103,20 +2103,18 @@ static void hp100_set_multicast_list(struct net_device *dev)
>  #endif
>  			netdev_for_each_mc_addr(ha, dev) {
>  				addrs = ha->addr;
> -				if ((*addrs & 0x01) == 0x01) {	/* multicast address? */
>  #ifdef HP100_DEBUG
> -					printk("hp100: %s: multicast = %pM, ",
> -						     dev->name, addrs);
> +				printk("hp100: %s: multicast = %pM, ",
> +					     dev->name, addrs);
>  #endif
> -					for (i = idx = 0; i < 6; i++) {
> -						idx ^= *addrs++ & 0x3f;
> -						printk(":%02x:", idx);
> -					}
> +				for (i = idx = 0; i < 6; i++) {
> +					idx ^= *addrs++ & 0x3f;
> +					printk(":%02x:", idx);
> +				}

It looks as if printing the per-byte hash
should also be guarded by HP100_DEBUG.

It's been this way since at least 2.4.1 though.

Does anyone still use this adapter?


--
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