]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Decouple the UUID generator from network interfaces by having MAC
authorMarcel Moolenaar <marcel@FreeBSD.org>
Wed, 24 Jul 2013 04:24:21 +0000 (04:24 +0000)
committerMarcel Moolenaar <marcel@FreeBSD.org>
Wed, 24 Jul 2013 04:24:21 +0000 (04:24 +0000)
commitef1f916971dc57bc4cc60ec447721644568ff250
tree5a9b936ca0a1586a327a35bf012dd92454f71b1c
parentd2034d1b22b1c9a551fa3cd7d5143bb1d2dd4602
Decouple the UUID generator from network interfaces by having MAC
addresses added to the UUID generator using uuid_ether_add(). The
UUID generator keeps an arbitrary number of MAC addresses, under
the assumption that they are rarely removed (= uuid_ether_del()).
This achieves the following:
1.  It brings up closer to having the network stack as a loadable
    module.
2.  It allows the UUID generator to filter MAC addresses for best
    results (= highest chance of uniqeness).
3.  MAC addresses can come from anywhere, irrespactive of whether
    it's used for an interface or not.

A side-effect of the change is that when no MAC addresses have been
added, a random multicast MAC address is created once and re-used if
needed. Previusly, when a random MAC address was needed, it was
created for every call. Thus, a change in behaviour is introduced
for when no MAC addresses exist.

Obtained from: Juniper Networks, Inc.
sys/kern/kern_uuid.c
sys/net/if_ethersubr.c
sys/sys/uuid.h