Skip to content

Commit c5249d4

Browse files
authored
update historical note
1 parent 4b8a59e commit c5249d4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Lib/uuid.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,10 +656,13 @@ def _windll_getnode():
656656

657657
def _random_getnode():
658658
"""Get a random node ID."""
659-
# RFC 4122, $4.1.6 says "For systems with no IEEE address, a randomly or
660-
# pseudo-randomly generated value may be used; see Section 4.5. The
661-
# multicast bit must be set in such addresses, in order that they will
662-
# never conflict with addresses obtained from network cards."
659+
# RFC 9562, §6.10 says that
660+
#
661+
# Implementations MAY elect to obtain a 48-bit cryptographic-quality
662+
# random number as per Section 6.9 to use as the Node ID. [...] [and]
663+
# implementations MUST set the least significant bit of the first octet
664+
# of the Node ID to 1. This bit is the unicast or multicast bit, which
665+
# will never be set in IEEE 802 addresses obtained from network cards.
663666
#
664667
# The "multicast bit" of a MAC address is defined to be "the least
665668
# significant bit of the first octet". This works out to be the 41st bit

0 commit comments

Comments
 (0)