--- old/usr/src/lib/libuuid/Makefile.com	Thu Sep 17 11:11:34 2015
+++ new/usr/src/lib/libuuid/Makefile.com	Thu Sep 17 11:11:34 2015
@@ -21,8 +21,8 @@
 #
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
 #
 
 LIBRARY =	libuuid.a
@@ -35,7 +35,7 @@
 include ../../Makefile.rootfs
 
 LIBS =		$(DYNLIB) $(LINTLIB)
-LDLIBS +=	-lsocket -lnsl -lc -ldlpi
+LDLIBS +=	-lsocket -lnsl -lc
 
 SRCDIR =	../common
 $(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
--- old/usr/src/lib/libuuid/common/etheraddr.c	Thu Sep 17 11:11:35 2015
+++ new/usr/src/lib/libuuid/common/etheraddr.c	Thu Sep 17 11:11:35 2015
@@ -21,10 +21,10 @@
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <strings.h>
@@ -32,7 +32,6 @@
 #include <unistd.h>
 #include <uuid/uuid.h>
 #include <sys/sockio.h>
-#include <libdlpi.h>
 #include <sys/utsname.h>
 
 #include <netdb.h>
@@ -41,12 +40,10 @@
 
 #include "etheraddr.h"
 
-static boolean_t get_etheraddr(const char *linkname, void *arg);
-
 /*
  * get an individual arp entry
  */
-int
+static int
 arp_get(uuid_node_t *node)
 {
 	struct utsname name;
@@ -89,54 +86,55 @@
 }
 
 /*
- * Name:	get_ethernet_address
- *
- * Description:	Obtains the system ethernet address.
- *
- * Returns:	0 on success, non-zero otherwise.  The system ethernet
- *		address is copied into the passed-in variable.
+ * Fake up a valid Ethernet address based on gethostid().
+ * This is likely to be unique to this machine, and that's
+ * good enough for libuuid when we can't easily get our
+ * real Ethernet address.
  */
-int
-get_ethernet_address(uuid_node_t *node)
+static int
+hostid_get(uuid_node_t *node)
 {
-	walker_arg_t	state;
+	uint32_t hostid;
 
-	if (arp_get(node) == 0)
-		return (0);
+	if ((hostid = (uint32_t)gethostid()) == 0)
+		return (-1);
+	hostid = htonl(hostid);
 
 	/*
-	 * Try to get physical (ethernet) address from network interfaces.
+	 * Like gen_ethernet_address(), use prefix:
+	 * 8:0:... with the multicast bit set.
 	 */
-	state.wa_addrvalid = B_FALSE;
-	dlpi_walk(get_etheraddr, &state, 0);
-	if (state.wa_addrvalid)
-		bcopy(state.wa_etheraddr, node, state.wa_etheraddrlen);
+	node->nodeID[0] = 0x88;
+	node->nodeID[1] = 0x00;
+	(void) memcpy(node->nodeID + 2, &hostid, sizeof (hostid));
 
-	return (state.wa_addrvalid ? 0 : -1);
+	return (0);
 }
 
 /*
- * Get the physical address via DLPI and update the flag to true upon success.
+ * Name:	get_ethernet_address
+ *
+ * Description:	Obtains the system ethernet address, if possible.
+ *
+ * Returns:	0 on success, non-zero otherwise.  The system ethernet
+ *		address is copied into the passed-in variable.
+ *
+ * Note:  This does NOT need to get the REAL Ethernet address.
+ * This library only needs something that looks like an Ethernet
+ * address and that's likely to be unique to this machine.  Also,
+ * we really don't want to drag in libdlpi (etc) here so this just
+ * tries an SIOCGARP ioctl, then a hostid-derived method.  If all
+ * methods here fail, the caller generates an Ethernet address.
  */
-static boolean_t
-get_etheraddr(const char *linkname, void *arg)
+int
+get_ethernet_address(uuid_node_t *node)
 {
-	int		retval;
-	dlpi_handle_t	dh;
-	walker_arg_t	*statep = arg;
 
-	if (dlpi_open(linkname, &dh, 0) != DLPI_SUCCESS)
-		return (B_FALSE);
+	if (arp_get(node) == 0)
+		return (0);
 
-	statep->wa_etheraddrlen = DLPI_PHYSADDR_MAX;
-	retval = dlpi_get_physaddr(dh, DL_CURR_PHYS_ADDR,
-	    statep->wa_etheraddr, &(statep->wa_etheraddrlen));
+	if (hostid_get(node) == 0)
+		return (0);
 
-	dlpi_close(dh);
-
-	if (retval == DLPI_SUCCESS) {
-		statep->wa_addrvalid = B_TRUE;
-		return (B_TRUE);
-	}
-	return (B_FALSE);
+	return (-1);
 }
--- old/usr/src/lib/libuuid/common/etheraddr.h	Thu Sep 17 11:11:35 2015
+++ new/usr/src/lib/libuuid/common/etheraddr.h	Thu Sep 17 11:11:35 2015
@@ -21,20 +21,17 @@
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  */
 
 #ifndef	_ETHERADDR_H
 #define	_ETHERADDR_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * Module:	etheraddr
  * Description:	This is the solaris-specific interface for retrieving
  *		the MAC (IEEE 802.3) node identifier, a.k.a. the ethernet
- *		address of the system.  Note that this can only get the
- *		ethernet address if the process running the code can open
- *		/dev/[whatever] read/write, e.g. you must be root.
+ *		address of the system.  Note, only tries SIOCGARP.
  */
 
 #ifdef	__cplusplus
@@ -46,14 +43,7 @@
 #include <netinet/if_ether.h>
 #include <sys/uuid.h>
 
-typedef struct walker_arg {
-	uchar_t	wa_etheraddr[DLPI_PHYSADDR_MAX];
-	size_t	wa_etheraddrlen;
-	boolean_t	wa_addrvalid;
-} walker_arg_t;
-
 /* global function */
-int	arp_get(uuid_node_t *);
 int	get_ethernet_address(uuid_node_t *);
 
 #ifdef __cplusplus
--- old/usr/src/lib/libuuid/common/uuid.c	Thu Sep 17 11:11:35 2015
+++ new/usr/src/lib/libuuid/common/uuid.c	Thu Sep 17 11:11:35 2015
@@ -24,6 +24,7 @@
  * Copyright 2012 Milan Jurik. All rights reserved.
  * Copyright 2015 Joyent, Inc. All rights reserved.
  * Copyright 2014 Andrew Stormont.
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
  */
 
 /*
@@ -188,12 +189,10 @@
 		arc4random_buf(node, 6);
 		(void) memcpy(system_node->nodeID, node, 6);
 		/*
-		 * use 8:0:20 with the multicast bit set
-		 * to avoid namespace collisions.
+		 * use 8:.. with the multicast bit set
+		 * to reduce namespace collisions.
 		 */
 		system_node->nodeID[0] = 0x88;
-		system_node->nodeID[1] = 0x00;
-		system_node->nodeID[2] = 0x20;
 	}
 }
 
