--- old/usr/src/lib/libdladm/common/linkprop.c	2014-02-20 18:59:04.028490603 +0000
+++ new/usr/src/lib/libdladm/common/linkprop.c	2014-02-20 18:59:04.120081804 +0000
@@ -149,18 +149,18 @@
 			get_flowctl, get_maxbw, get_cpus, get_priority,
 			get_tagmode, get_range, get_stp, get_bridge_forward,
 			get_bridge_pvid, get_protection, get_rxrings,
-			get_txrings, get_cntavail,
+			get_txrings, get_cntavail, get_macaddr,
 			get_allowedips, get_allowedcids, get_pool,
 			get_rings_range, get_linkmode_prop;
 
 static pd_setf_t	set_zone, set_rate, set_powermode, set_radio,
 			set_public_prop, set_resource, set_stp_prop,
-			set_bridge_forward, set_bridge_pvid;
+			set_bridge_forward, set_bridge_pvid, set_macaddr;
 
 static pd_checkf_t	check_zone, check_autopush, check_rate, check_hoplimit,
 			check_encaplim, check_uint32, check_maxbw, check_cpus,
 			check_stp_prop, check_bridge_pvid, check_allowedips,
-			check_allowedcids, check_rings,
+			check_allowedcids, check_rings, check_macaddr,
 			check_pool, check_prop;
 
 struct prop_desc {
@@ -363,6 +363,8 @@
 
 	{ MAC_PROP_IB_LINKMODE,	sizeof (uint32_t),	"linkmode"},
 
+	{ MAC_PROP_MACADDRESS,	sizeof (mac_addrprop_t), "mac-address"},
+
 	{ MAC_PROP_PRIVATE,	0,			"driver-private"}
 };
 
@@ -682,6 +684,11 @@
 	    set_resource, NULL, get_protection, check_prop, 0,
 	    DATALINK_CLASS_ALL, DATALINK_ANY_MEDIATYPE },
 
+	{ "mac-address", { "", 0 }, NULL, 0,
+	    set_macaddr, NULL, get_macaddr, check_macaddr, PD_CHECK_ALLOC,
+	    DATALINK_CLASS_PHYS|DATALINK_CLASS_AGGR|DATALINK_CLASS_VNIC|
+	    DATALINK_CLASS_SIMNET, DATALINK_ANY_MEDIATYPE },
+
 	{ "allowed-ips", { "--", 0 },
 	    NULL, 0, set_resource, NULL,
 	    get_allowedips, check_allowedips, PD_CHECK_ALLOC,
@@ -725,7 +732,6 @@
 	{ "txhwclnt-available", { "", 0 }, NULL, 0,
 	    NULL, NULL, get_cntavail, NULL, 0,
 	    DATALINK_CLASS_ALL, DATALINK_ANY_MEDIATYPE },
-
 };
 
 #define	DLADM_MAX_PROPS	(sizeof (prop_table) / sizeof (prop_desc_t))
@@ -2245,6 +2251,76 @@
 
 /* ARGSUSED */
 static dladm_status_t
+get_macaddr(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
+    char **prop_val, uint_t *val_cnt, datalink_media_t media, uint_t flags,
+    uint_t *perm_flags)
+{
+	mac_addrprop_t	addrprop;
+	dladm_status_t	status;
+
+	status = i_dladm_get_public_prop(handle, linkid, pdp->pd_name,
+	    flags, perm_flags, &addrprop, sizeof (addrprop));
+	if (status != DLADM_STATUS_OK)
+		return (status);
+
+	(void) _link_ntoa(addrprop.ma_addr, prop_val[0], addrprop.ma_len,
+	    IFT_OTHER);
+
+	*val_cnt = 1;
+
+	return (DLADM_STATUS_OK);
+}
+
+/* ARGSUSED */
+static dladm_status_t
+set_macaddr(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
+    val_desc_t *vdp, uint_t val_cnt, uint_t flags, datalink_media_t media)
+{
+	if (val_cnt != 1)
+		return (DLADM_STATUS_BADVALCNT);
+
+	return (set_public_prop(handle, pdp, linkid, vdp, val_cnt,
+	    flags, media));
+}
+
+/* ARGSUSED */
+static dladm_status_t
+check_macaddr(dladm_handle_t handle, prop_desc_t *pdp, datalink_id_t linkid,
+    char **prop_val, uint_t *val_cntp, uint_t flags, val_desc_t **vdpp,
+    datalink_media_t media)
+{
+	mac_addrprop_t	*addrprop;
+	val_desc_t	*vdp = *vdpp;
+	uint_t		val_cnt = *val_cntp;
+	uchar_t		*macaddr;
+	int		maclen;
+	dladm_status_t	status = DLADM_STATUS_OK;
+
+	if (val_cnt != 1)
+		return (DLADM_STATUS_BADVALCNT);
+
+	macaddr = _link_aton(*prop_val, &maclen);
+	if (macaddr == NULL)
+		return (DLADM_STATUS_BADVAL);
+
+	addrprop = malloc(sizeof (mac_addrprop_t));
+	if (addrprop == NULL) {
+		status = DLADM_STATUS_NOMEM;
+		goto out;
+	}
+
+	(void) memcpy(addrprop->ma_addr, macaddr, maclen);
+	addrprop->ma_len = maclen;
+
+	vdp->vd_val = (uintptr_t)addrprop;
+
+out:
+	free(macaddr);
+	return (status);
+}
+
+/* ARGSUSED */
+static dladm_status_t
 set_resource(dladm_handle_t handle, prop_desc_t *pdp,
     datalink_id_t linkid, val_desc_t *vdp, uint_t val_cnt,
     uint_t flags, datalink_media_t media)
--- old/usr/src/man/man1m/dladm.1m	2014-02-20 18:59:04.994349540 +0000
+++ new/usr/src/man/man1m/dladm.1m	2014-02-20 18:59:05.007342682 +0000
@@ -8,7 +8,7 @@
 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH DLADM 1M "Sep 23, 2009"
+.TH DLADM 1M "Feb 22, 2014"
 .SH NAME
 dladm \- administer data links
 .SH SYNOPSIS
@@ -4444,6 +4444,16 @@
 .sp
 .ne 2
 .na
+\fB\fBmac-address\fR\fR
+.ad
+.sp .6
+.RS 4n
+The MAC address of the link.  The default value is the factory MAC address.
+.RE
+
+.sp
+.ne 2
+.na
 \fB\fBmaxbw\fR\fR
 .ad
 .sp .6
--- old/usr/src/uts/common/io/mac/mac.c	2014-02-20 18:59:05.683526536 +0000
+++ new/usr/src/uts/common/io/mac/mac.c	2014-02-20 18:59:05.697266205 +0000
@@ -2989,6 +2989,8 @@
 	case MAC_PROP_WL_MLME:
 		minsize = sizeof (wl_mlme_t);
 		break;
+	case MAC_PROP_MACADDRESS:
+		minsize = sizeof (mac_addrprop_t);
 	}
 
 	return (valsize >= minsize);
@@ -3065,6 +3067,16 @@
 		break;
 	}
 
+	case MAC_PROP_MACADDRESS: {
+		mac_addrprop_t	*addrprop = val;
+
+		if (addrprop->ma_len != mip->mi_type->mt_addr_length)
+			return (EINVAL);
+
+		err = mac_unicast_primary_set(mh, addrprop->ma_addr);
+		break;
+	}
+
 	default:
 		/* For other driver properties, call driver's callback */
 		if (mip->mi_callbacks->mc_callbacks & MC_SETPROP) {
@@ -3180,6 +3192,16 @@
 		 */
 		return (0);
 
+	case MAC_PROP_MACADDRESS: {
+		mac_addrprop_t	*addrprop = val;
+
+		if (valsize < sizeof (mac_addrprop_t))
+			return (EINVAL);
+		mac_unicast_primary_get(mh, addrprop->ma_addr);
+		addrprop->ma_len = mip->mi_type->mt_addr_length;
+		return (0);
+	}
+
 	default:
 		break;
 
@@ -3333,6 +3355,19 @@
 		if (perm != NULL)
 			*perm = MAC_PROP_PERM_READ;
 		return (0);
+
+	case MAC_PROP_MACADDRESS: {
+		mac_addrprop_t	*defaddr = default_val;
+
+		if (defaddr != NULL) {
+			if (default_size < sizeof (mac_addrprop_t))
+				return (EINVAL);
+			bcopy(mip->mi_info.mi_unicst_addr, defaddr->ma_addr,
+			    mip->mi_type->mt_addr_length);
+			defaddr->ma_len = mip->mi_type->mt_addr_length;
+		}
+		return (0);
+	}
 	}
 
 	/*
--- old/usr/src/uts/common/io/mac/mac_client.c	2014-02-20 18:59:06.588631891 +0000
+++ new/usr/src/uts/common/io/mac/mac_client.c	2014-02-20 18:59:06.601812924 +0000
@@ -2347,7 +2347,7 @@
  * The MAC address can be specified either by value, or the MAC client
  * can specify that it wants to use the primary MAC address of the
  * underlying MAC. See the introductory comments at the beginning
- * of this file for more more information on primary MAC addresses.
+ * of this file for more information on primary MAC addresses.
  *
  * Note also the tuple (MAC address, VID) must be unique
  * for the MAC clients defined on top of the same underlying MAC
--- old/usr/src/uts/common/sys/mac.h	2014-02-20 18:59:07.327202593 +0000
+++ new/usr/src/uts/common/sys/mac.h	2014-02-20 18:59:07.339914019 +0000
@@ -133,6 +133,11 @@
 	MAC_LOGTYPE_FLOW
 } mac_logtype_t;
 
+typedef struct mac_addrprop_s {
+	uint32_t	ma_len;
+	uint8_t		ma_addr[MAXMACADDRLEN];
+} mac_addrprop_t;
+
 #define	MAXLINKPROPNAME		256		/* max property name len */
 
 /*
@@ -205,6 +210,7 @@
 	MAC_PROP_MAX_RXHWCLNT_AVAIL,
 	MAC_PROP_MAX_TXHWCLNT_AVAIL,
 	MAC_PROP_IB_LINKMODE,
+	MAC_PROP_MACADDRESS,
 	MAC_PROP_PRIVATE = -1
 } mac_prop_id_t;
 
