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>
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;
}
<optional>
<attribute name="type">
<choice>
+ <value>default</value>
<value>passt</value>
</choice>
</attribute>