summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-07-21 02:32:32 +0000
committerTarmac <>2010-07-21 02:32:32 +0000
commitc771ef02cdbae6a9f409a1ec9fb8aed965f13639 (patch)
treed380115bce42c165a1fcd607cf766621566334a4
parent210857830586ea1fabee284d85b2a2646dc81029 (diff)
parent8f9d5a66fdebe2bdd41bfbb7d20fbab531cd3b3f (diff)
downloadnova-c771ef02cdbae6a9f409a1ec9fb8aed965f13639.tar.gz
nova-c771ef02cdbae6a9f409a1ec9fb8aed965f13639.tar.xz
nova-c771ef02cdbae6a9f409a1ec9fb8aed965f13639.zip
Locally administered mac addresses have the second least significant bit of the most significant byte set. If this byte is set then udev on ubuntu doesn't set persistent net rules.
This patch changes the generate_mac to generate a locally administered mac address.
-rw-r--r--nova/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py
index c5b935673..9ecceafe0 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -94,7 +94,7 @@ def generate_uid(topic, size=8):
def generate_mac():
- mac = [0x00, 0x16, 0x3e, random.randint(0x00, 0x7f),
+ mac = [0x02, 0x16, 0x3e, random.randint(0x00, 0x7f),
random.randint(0x00, 0xff), random.randint(0x00, 0xff)
]
return ':'.join(map(lambda x: "%02x" % x, mac))