From: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
To: linux-kernel@vger.kernel.org
Subject: small etherdevice.h fix
Date: Fri, 3 Feb 2006 21:08:23 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.62.0602032105180.31368@artax.karlin.mff.cuni.cz> (raw)
Hi
This fixes a small bug in is_valid_ether_addr --- for address in the form
FF:xx:xx:xx:xx:xx it returns true. The comment is about FF:FF:FF:FF:FF:FF
is not true, is_multicast_ether_addr doesn't accept FF:FF:FF:FF:FF:FF as
multicast (as you can see few lines above).
Mikulas
--- include/linux/etherdevice.h_ 2006-02-03 21:05:23.000000000 +0100
+++ include/linux/etherdevice.h 2006-02-03 21:05:59.000000000 +0100
@@ -91,9 +91,7 @@
*/
static inline int is_valid_ether_addr(const u8 *addr)
{
- /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to
- * explicitly check for it here. */
- return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
+ return !(addr[0] & 1) && !is_zero_ether_addr(addr);
}
/**
next reply other threads:[~2006-02-03 20:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-03 20:08 Mikulas Patocka [this message]
2006-02-03 21:22 ` small etherdevice.h fix Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.62.0602032105180.31368@artax.karlin.mff.cuni.cz \
--to=mikulas@artax.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).