Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2017 04:47:22 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314471 - head/sys/net
Message-ID:  <201703010447.v214lM4c026957@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Wed Mar  1 04:47:22 2017
New Revision: 314471
URL: https://svnweb.freebsd.org/changeset/base/314471

Log:
  Fix VNET - DAD detected duplicate IPv6 address
  
  Assign a hopefully unique, locally administered etheraddr. - for
  epairNa & epairNb
  
  Submitted by:	Catalin <sslevil@users.noreply.github.com>
  Pull Request:	https://github.com/freebsd/freebsd/pull/92

Modified:
  head/sys/net/if_epair.c

Modified: head/sys/net/if_epair.c
==============================================================================
--- head/sys/net/if_epair.c	Wed Mar  1 04:41:59 2017	(r314470)
+++ head/sys/net/if_epair.c	Wed Mar  1 04:47:22 2017	(r314471)
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/sockio.h>
 #include <sys/sysctl.h>
 #include <sys/types.h>
+#include <sys/libkern.h>
 
 #include <net/bpf.h>
 #include <net/ethernet.h>
@@ -724,6 +725,7 @@ epair_clone_create(struct if_clone *ifc,
 		ifp = scb->ifp;
 		/* Assign a hopefully unique, locally administered etheraddr. */
 		eaddr[0] = 0x02;
+		eaddr[1] = arc4random() & 0xff;
 		eaddr[3] = (ifp->if_index >> 8) & 0xff;
 		eaddr[4] = ifp->if_index & 0xff;
 		eaddr[5] = 0x0b;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703010447.v214lM4c026957>