]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
No address attribute in Xen domain XML.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 26 Feb 2008 18:31:57 +0000 (18:31 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 26 Feb 2008 18:31:57 +0000 (18:31 +0000)
* src/xm_internal.c: handle the case where <mac/> clause
  in Xen domain interface has no address attribute
  (Shigeki Sakamoto).

ChangeLog
src/xm_internal.c

index c24edc6ab46f178adcabe7be7fef3ea637b38107..4edc316c67e7100dd9d1394cf89bfb021fa05755 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Feb 26 18:28:00 UTC 2008 Richard W.M. Jones <rjones@redhat.com>
+
+       No address attribute in Xen domain XML.
+       * src/xm_internal.c: handle the case where <mac/> clause
+         in Xen domain interface has no address attribute
+         (Shigeki Sakamoto).
+
 Tue Feb 26 08:02:57 CET 2008 Daniel Veillard <veillard@redhat.com>
 
        * src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c
index 711774bd272559a64d5d6deeb4fe8ff4f3725122..b12d99cecf12ca2b39e59cb7cabf45a2ec0c14d1 100644 (file)
@@ -2769,12 +2769,13 @@ xenXMAttachInterface(virDomainPtr domain, xmlXPathContextPtr ctxt, int hvm,
     }
     source = xmlGetProp(node, BAD_CAST type);
 
-    if (!(node = virXPathNode("/interface/mac", ctxt))) {
+    if ((node = virXPathNode("/interface/mac", ctxt)))
+        mac = xmlGetProp(node, BAD_CAST "address");
+    if (!node || !mac) {
         if (!(mac = (xmlChar *)xenXMAutoAssignMac()))
             goto cleanup;
         autoassign = 1;
-    } else
-        mac = xmlGetProp(node, BAD_CAST "address");
+    }
 
     list_item = virConfGetValue(entry->conf, "vif");
     if (list_item && list_item->type == VIR_CONF_LIST) {