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
This commit is contained in:
parent
62f32e06bc
commit
7d85b06ecf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314471
@ -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, char *name, size_t len, caddr_t params)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user