mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: Accept 'default' backend type for <interface type='user'/>
After previous commits, domain capabilities XML reports basically two possible values for backend type: 'default' and 'passt'. Despite its misleading name, 'default' really means 'use hypervisor's builtin SLIRP'. Since it's reported in domain capabilities as a value accepted, make our parser and XML schema accept it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
6a0f45a9e0
commit
751a327423
@ -9320,8 +9320,11 @@ virDomainNetBackendParseXML(xmlNodePtr node,
|
||||
g_autofree char *tap = virXMLPropString(node, "tap");
|
||||
g_autofree char *vhost = virXMLPropString(node, "vhost");
|
||||
|
||||
/* The VIR_DOMAIN_NET_BACKEND_DEFAULT really means 'use hypervisor's
|
||||
* builtin SLIRP'. It's reported in domain caps and thus we need to accept
|
||||
* it. Hence VIR_XML_PROP_NONE instead of VIR_XML_PROP_NONZERO. */
|
||||
if (virXMLPropEnum(node, "type", virDomainNetBackendTypeFromString,
|
||||
VIR_XML_PROP_NONZERO, &def->backend.type) < 0) {
|
||||
VIR_XML_PROP_NONE, &def->backend.type) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -3826,6 +3826,7 @@
|
||||
<optional>
|
||||
<attribute name="type">
|
||||
<choice>
|
||||
<value>default</value>
|
||||
<value>passt</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
|
Loading…
x
Reference in New Issue
Block a user