Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753308Ab0GUPHw (ORCPT ); Wed, 21 Jul 2010 11:07:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58099 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751131Ab0GUPHr (ORCPT ); Wed, 21 Jul 2010 11:07:47 -0400 Date: Wed, 21 Jul 2010 11:07:32 -0400 From: Andy Gospodarek To: Harald Hoyer Cc: David Miller , shemminger@vyatta.com, bhutchings@solarflare.com, sassmann@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, gospo@redhat.com, gregory.v.rose@intel.com, alexander.h.duyck@intel.com, leedom@chelsio.com Subject: Re: [PATCH net-next] sysfs: add entry to indicate network interfaces with random MAC address Message-ID: <20100721150732.GR7497@gospo.rdu.redhat.com> References: <20100720141816.16f0a939@nehalam> <20100720.142045.32697196.davem@davemloft.net> <4C469313.6010807@redhat.com> <20100720.233457.267367495.davem@davemloft.net> <4C469808.5060308@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C469808.5060308@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1503 Lines: 40 On Wed, Jul 21, 2010 at 08:47:36AM +0200, Harald Hoyer wrote: > On 07/21/2010 08:34 AM, David Miller wrote: >> From: Harald Hoyer >> Date: Wed, 21 Jul 2010 08:26:27 +0200 >> >>> On 07/20/2010 11:20 PM, David Miller wrote: >>>> From: Stephen Hemminger >>>> Date: Tue, 20 Jul 2010 14:18:16 -0700 >>>> >>>>> No one mentioned that the first octet of an Ethernet address already >>>>> indicates "software generated" Ethernet address. Per the standard, >>>>> if bit 1 is set it means address is locally assigned. >>>>> >>>>> static inline bool is_locally_assigned_ether(const u8 *addr) >>>>> { >>>>> return (addr[0]& 0x2) != 0; >>>>> } >>>> >>>> W00t! >>>> >>>> Indeed, can udev just use that? :-) >>> >>> It already does: >>> see /lib/udev/rules.d/75-persistent-net-generator.rules >> >> So... why doesn't this work? > > It works.. but the information, that the MAC is randomly generated would > be valuable. So, for the non-random locally assigned MAC (with bit 1), we > could easily make persistent rules based on the MAC, instead of > completely ignoring them, like we do currently. Agreed. The subtle difference between a locally assigned address that is persistent and one that is random would be helpful. -- 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/