Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit a80a447

Browse files
committed
util: Don't limit random mac addr range
This function was originally taken from xen, which limited the range to reserve some MAC addresses for possible internal testing. Doesn't seem like it was ever leveraged in practice, and libvirt doesn't limit mac generation in a similar way, so just drop it.
1 parent 4df4fc3 commit a80a447

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

virtinst/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def randomMAC(type = "xen"):
208208
oui = ouis['xen']
209209

210210
mac = oui + [
211-
random.randint(0x00, 0x7f),
211+
random.randint(0x00, 0xff),
212212
random.randint(0x00, 0xff),
213213
random.randint(0x00, 0xff) ]
214214
return ':'.join(map(lambda x: "%02x" % x, mac))

0 commit comments

Comments
 (0)