lkml.org 
[lkml]   [2006]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectsmall etherdevice.h fix
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);
}

/**
-
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: 2006-02-03 21:10    [W:1.956 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site