From: Peter Krempa Date: Fri, 16 Sep 2022 16:25:19 +0000 (+0200) Subject: virDomainNetDefParseXML: Drop prehistoric error workaround X-Git-Tag: v8.9.0-rc1~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8802c38fd51ba1c918753751542655bf3871333c;p=thirdparty%2Flibvirt.git virDomainNetDefParseXML: Drop prehistoric error workaround Apart from it being a long time ago the 'openvz' driver is also rarely used. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Laine Stump --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a95fb0eadb..a609cc4f68 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8998,7 +8998,6 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, VIR_XPATH_NODE_AUTORESTORE(ctxt) int rv; g_autofree char *macaddr = NULL; - g_autofree char *dev = NULL; g_autofree char *model = NULL; g_autofree char *linkstate = NULL; g_autofree char *tap = NULL; @@ -9120,25 +9119,6 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, break; case VIR_DOMAIN_NET_TYPE_ETHERNET: - /* This clause is only necessary because from 2010 to 2016 it was - * possible (but never documented) to configure the name of the - * guest-side interface of an openvz domain with . - * That was blatant misuse of , so was likely (hopefully) - * never used, but just in case there was somebody using it, we - * need to generate an error. If the openvz driver is ever - * deprecated, this clause can be removed from here. - */ - if (source_node) { - if ((dev = virXMLPropString(source_node, "dev"))) { - virReportError(VIR_ERR_XML_ERROR, - _("Invalid attempt to set " - "device name with . " - "Use (for host-side) " - "or (for guest-side) instead."), - dev, dev, dev); - return NULL; - } - } parse_filterref = true; break;