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@xxxxxxxxxx> --- src/conf/domain_conf.c | 5 ++++- src/conf/schemas/domaincommon.rng | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cb1154b23f..334152c4ff 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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; } diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng index 844a931deb..33e34255f4 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -3826,6 +3826,7 @@ <optional> <attribute name="type"> <choice> + <value>default</value> <value>passt</value> </choice> </attribute> -- 2.44.2