|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] Really randomize generated MAC addresses
Randomly generated vif MAC addresses are decidedly non-random.....
duplicate even. I tracked it down to the PRNG being re-seeded
with the same seed (the current timestamp) for each vif.
Jim
# HG changeset patch
# User Jim Dykman dykman@xxxxxxxxxx
# Node ID 06be64b17a136d2d6029b500611e32199b8065f1
# Parent 3d187585c1415fbb14cb285cc71e0ff0faf81e67
Really randomize generated MAC addresses
random.seed() uses the timestamp as a new seed and we're calling
randomMAC faster than the timestamp changes, resulting in duplicate MACs.
Signed-off-by: Jim Dykman <dykman@xxxxxxxxxx>
diff -r 3d187585c141 -r 06be64b17a13 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Tue Aug 16 11:20:47 2005
+++ b/tools/python/xen/xm/create.py Tue Aug 16 17:07:25 2005
@@ -380,7 +380,6 @@
@return: MAC address string
"""
- random.seed()
mac = [ 0xaa, 0x00, 0x00,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] Really randomize generated MAC addresses,
James Dykman <=
|
|
|
|
|