]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
kern: ether_gen_addr: randomize on default hostuuid, too
authorKyle Evans <kevans@FreeBSD.org>
Fri, 16 Apr 2021 01:11:35 +0000 (20:11 -0500)
committerKevin Bowling <kbowling@FreeBSD.org>
Fri, 20 Aug 2021 21:35:49 +0000 (14:35 -0700)
commit0a7dbddfb0ca789acca9858c980e58ab8f1bc6de
tree0cf3a2dc4c82c7f35b4b80c1a16d46ccf3349ec1
parent778488b9254ba53e1a86e139f25df90fabe0784a
kern: ether_gen_addr: randomize on default hostuuid, too

Currently, this will still hash the default (all zero) hostuuid and
potentially arrive at a MAC address that has a high chance of collision
if another interface of the same name appears in the same broadcast
domain on another host without a hostuuid, e.g., some virtual machine
setups.

Instead of using the default hostuuid, just treat it as a failure and
generate a random LA unicast MAC address.

Reviewed by: bz, gbe, imp, kbowling, kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29788

(cherry picked from commit 2d741f33bd07bf94a59635db3c7b9e070a8a6e55)
share/man/man9/ether_gen_addr.9
sys/kern/kern_jail.c
sys/net/if_ethersubr.c
sys/sys/jail.h