On Mon, 12 Dec 2005 18:56:49 -0600
Michael Ellerman <[EMAIL PROTECTED]> wrote:

> Since a5fe736eaf9bae1b45317313de04b564441b94f2 (2.6.13-rc1 ish),
> is_valid_ether_addr() has been broken, because its assumption that
> FF:FF:FF:FF:FF:FF is a multicast address is wrong. Ouch.
> 
> Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
> ---
> 
>  include/linux/etherdevice.h |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> Index: linux/include/linux/etherdevice.h
> ===================================================================
> --- linux.orig/include/linux/etherdevice.h
> +++ linux/include/linux/etherdevice.h
> @@ -91,9 +91,9 @@ static inline int is_broadcast_ether_add
>   */
>  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  !is_broadcast_ether_addr(addr) &&
> +             !is_multicast_ether_addr(addr) &&
> +             !is_zero_ether_addr(addr);
>  }
>  

why not
        return !(addr[0] & 1) && !is_zero_ether_addr(addr);

-- 
Stephen Hemminger <[EMAIL PROTECTED]>
OSDL http://developer.osdl.org/~shemminger
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to