commit 4f4b36a7c5eaf2066b07c9aea98d6349f98a8c8f
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Tue Feb 11 14:30:12 2014 +0100
Normalize MAC addresses from mac_pool generator
The addresses from mac_pool generator were not sanitized so any address
containing some letter would fail comparison check because of case
sensitivity. I used normalize_hwaddr() function that we used globally
in the code for hardware address manipulation.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/Machine.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index 78ba622..193f611 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -558,8 +558,9 @@ class VirtualInterface(Interface):
msg = "Device with hwaddr %s already exists" % self._hwaddr
raise MachineError(msg)
else:
+ mac_pool = self._machine.get_mac_pool()
while True:
- self._hwaddr = self._machine.get_mac_pool().get_addr()
+ self._hwaddr = normalize_hwaddr(mac_pool.get_addr())
query = self._machine._rpc_call('get_devices_by_hwaddr',
self._hwaddr)
if not len(query):