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: <1341328615.20124.5.camel@jlt3.sipsolutions.net>
Date:	Tue, 03 Jul 2012 17:16:55 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Joe Perches <joe@...ches.com>
Cc:	netdev <netdev@...r.kernel.org>,
	linux-wireless <linux-wireless@...r.kernel.org>
Subject: Re: [PATCH] etherdevice: introduce broadcast_ether_addr

On Tue, 2012-07-03 at 08:13 -0700, Joe Perches wrote:
> On Tue, 2012-07-03 at 12:16 +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@...el.com>
> > 
> > A lot of code has either the memset or an
> > inefficient copy from a static array that
> > contains the all-ones broadcast address.
> > Introduce broadcast_ether_addr() to fill
> > an address with all ones, making the code
> > clearer and allowing us to get rid of the
> > various constant arrays.
> []
> > diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
> []
> > +static inline void broadcast_ether_addr(u8 *addr)
> > +{
> > +	memset(addr, 0xff, ETH_ALEN);
> > +}
> 
> I think this sort of patch should come as the first
> patch in a series with some example conversions.
> 
> It might be too easy to confuse is_broadcast_ether_addr
> with this function name too.  Maybe set_broadcast_ether_addr
> might be better.

Well, it's void so that'd be a compiler error :-)
Also, it's more like random_ether_addr()

johannes

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