[Pkg-libvirt-commits] [libguestfs] 139/266: v2v: VMware returns MAC all zeroes. Map this to None.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:41:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.35-1
in repository libguestfs.

commit 0539c2044c69f892c0a31fdb490e44403853fa57
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Aug 20 20:00:59 2014 +0100

    v2v: VMware returns MAC all zeroes.  Map this to None.
---
 v2v/source_libvirt.ml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/v2v/source_libvirt.ml b/v2v/source_libvirt.ml
index 4da5545..2f19426 100644
--- a/v2v/source_libvirt.ml
+++ b/v2v/source_libvirt.ml
@@ -201,7 +201,11 @@ let create_xml ?(map_source_file = identity) ?(map_source_dev = identity) xml =
       Xml.xpathctx_set_current_context xpathctx node;
 
       let mac = xpath_to_string "mac/@address" "" in
-      let mac = match mac with "" -> None | mac -> Some mac in
+      let mac =
+        match mac with
+        | ""
+        | "00:00:00:00:00:00" (* thanks, VMware *) -> None
+        | mac -> Some mac in
 
       let vnet_type =
         match xpath_to_string "@type" "" with

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list