svn commit: r306371 - head/sbin/ifconfig

Marcelo Araujo araujo at FreeBSD.org
Tue Sep 27 17:37:25 UTC 2016


Author: araujo
Date: Tue Sep 27 17:37:23 2016
New Revision: 306371
URL: https://svnweb.freebsd.org/changeset/base/306371

Log:
  Indicate that this is a locally administered MAC address.
  
  Submitted by:	lidl
  Differential Revision:	https://reviews.freebsd.org/D7903

Modified:
  head/sbin/ifconfig/af_link.c

Modified: head/sbin/ifconfig/af_link.c
==============================================================================
--- head/sbin/ifconfig/af_link.c	Tue Sep 27 17:27:07 2016	(r306370)
+++ head/sbin/ifconfig/af_link.c	Tue Sep 27 17:37:23 2016	(r306371)
@@ -96,8 +96,9 @@ link_getaddr(const char *addr, int which
 		sdl.sdl_nlen = 0;
 		sdl.sdl_family = AF_LINK;
 		arc4random_buf(&sdl.sdl_data, ETHER_ADDR_LEN);
-		/* Non-multicast and claim it is a hardware address */
+		/* Non-multicast and claim it is locally administered. */
 		sdl.sdl_data[0] &= 0xfc;
+		sdl.sdl_data[0] |= 0x02;
 	} else {
 		if ((temp = malloc(strlen(addr) + 2)) == NULL)
 			errx(1, "malloc failed");


More information about the svn-src-head mailing list