From owner-svn-src-head@FreeBSD.ORG Wed Jul 24 18:13:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9864EB82; Wed, 24 Jul 2013 18:13:43 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85C4F2342; Wed, 24 Jul 2013 18:13:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6OIDh89069070; Wed, 24 Jul 2013 18:13:43 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6OIDhpH069069; Wed, 24 Jul 2013 18:13:43 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201307241813.r6OIDhpH069069@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 24 Jul 2013 18:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253617 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jul 2013 18:13:43 -0000 Author: marcel Date: Wed Jul 24 18:13:43 2013 New Revision: 253617 URL: http://svnweb.freebsd.org/changeset/base/253617 Log: Further restrict the MAC addresses that we use for UUID generation to those that are universally administered. While it is possible to add locally administered MAC addresses, it's unclear whether those are (expected) to be more unique than random multicast MAC addresses or not. With many U-Boot configurations assigning fixed and non-official MAC addresses to ethernet ports and without setting the 'X' flag, this change may have very little value in the embedded (development) space. Uniqueness of the universally administered addresses is non- existent on the (H/W) bench and questionable under the (S/W) desk. In short: this change is aimed at production environments... Modified: head/sys/kern/kern_uuid.c Modified: head/sys/kern/kern_uuid.c ============================================================================== --- head/sys/kern/kern_uuid.c Wed Jul 24 17:55:08 2013 (r253616) +++ head/sys/kern/kern_uuid.c Wed Jul 24 18:13:43 2013 (r253617) @@ -203,10 +203,10 @@ uuid_ether_add(const uint8_t *addr) int i, sum; /* - * Validate input. No multicast addresses and no addresses that - * are all zeroes. + * Validate input. No multicast (flag 0x1), no locally administered + * (flag 0x2) and no 'all-zeroes' addresses. */ - if (addr[0] & 0x01) + if (addr[0] & 0x03) return (EINVAL); sum = 0; for (i = 0; i < UUID_NODE_LEN; i++)