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).
This commit is contained in:
Richard W.M. Jones 2008-02-26 18:31:57 +00:00
parent ea47a7d4e4
commit 242fe3d401
2 changed files with 11 additions and 3 deletions

View File

@ -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> 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 * src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c

View File

@ -2769,12 +2769,13 @@ xenXMAttachInterface(virDomainPtr domain, xmlXPathContextPtr ctxt, int hvm,
} }
source = xmlGetProp(node, BAD_CAST type); 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())) if (!(mac = (xmlChar *)xenXMAutoAssignMac()))
goto cleanup; goto cleanup;
autoassign = 1; autoassign = 1;
} else }
mac = xmlGetProp(node, BAD_CAST "address");
list_item = virConfGetValue(entry->conf, "vif"); list_item = virConfGetValue(entry->conf, "vif");
if (list_item && list_item->type == VIR_CONF_LIST) { if (list_item && list_item->type == VIR_CONF_LIST) {