aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_uuid.c
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2013-07-24 18:13:43 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2013-07-24 18:13:43 +0000
commitba7f4cdc97cacd5514727464c85d92a5ad33107a (patch)
tree44464173466a2395b829f312156094dfb041bb22 /sys/kern/kern_uuid.c
parent4234b97720ea238b2914ad20ccefb6fd0a107adb (diff)
downloadsrc-ba7f4cdc97cacd5514727464c85d92a5ad33107a.tar.gz
src-ba7f4cdc97cacd5514727464c85d92a5ad33107a.zip
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...
Notes
Notes: svn path=/head/; revision=253617
Diffstat (limited to 'sys/kern/kern_uuid.c')
-rw-r--r--sys/kern/kern_uuid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_uuid.c b/sys/kern/kern_uuid.c
index a739428062ac..fd4027b00440 100644
--- a/sys/kern/kern_uuid.c
+++ b/sys/kern/kern_uuid.c
@@ -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++)