From nobody Sat Feb 7 10:44:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1607709966; cv=none; d=zohomail.com; s=zohoarc; b=HDodm2D+Yx42j7YFaAoXe0LsskCsoFPoqzq447n85xfLKvcPEDSQDkSysAxIA0vsyy3SqfEmkzvgo4kJKU8cJU72Y/LOG2nCGZWG5h38hF/JYsqjislDIQEhQ8Fe7Sutuhi8qcBwfSOt16mbKtavDrh1DbJUTy6KTs2GnLehVKA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607709966; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WLzegb/MG1ObgWuGPgHXDQj9z9vx5JxsGFTifDwMcyA=; b=B9TTj7YZtyIRiSsh88Ie6GqY48a3wDVbCXofIwfMhk0N9bB3Rq7pKdUd52HQOFtgHx1884/RfWj9+I7ra5Io4CcIQDlXax8378pvIW8730lI6WfZWDYAgo4nO+wjPgzUS/I64shEgdFojH2VyG3XEIyMrkSSMG1NYS2N8e0t8NE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1607709966628121.74162880002666; Fri, 11 Dec 2020 10:06:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-J548S3vUMc-lSynITbRenw-1; Fri, 11 Dec 2020 13:06:00 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 197D51005D52; Fri, 11 Dec 2020 18:05:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E75B819C78; Fri, 11 Dec 2020 18:05:53 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B03055002F; Fri, 11 Dec 2020 18:05:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BBI5i1U027594 for ; Fri, 11 Dec 2020 13:05:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id D8402115D7BA; Fri, 11 Dec 2020 18:05:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D3795115D7BC for ; Fri, 11 Dec 2020 18:05:44 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBBB41010427 for ; Fri, 11 Dec 2020 18:05:44 +0000 (UTC) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-274-a6NjBYCjO2ejAyDLKlsdPw-1; Fri, 11 Dec 2020 13:05:42 -0500 Received: by mail-qk1-f196.google.com with SMTP id i67so1757219qkf.11 for ; Fri, 11 Dec 2020 10:05:42 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:9e32:a7fb:6602:e8c2:3c0f]) by smtp.gmail.com with ESMTPSA id y6sm7585703qkj.60.2020.12.11.10.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 10:05:39 -0800 (PST) X-MC-Unique: J548S3vUMc-lSynITbRenw-1 X-MC-Unique: a6NjBYCjO2ejAyDLKlsdPw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WLzegb/MG1ObgWuGPgHXDQj9z9vx5JxsGFTifDwMcyA=; b=S4bp9x+1Is1tlPKXpE+dcDPd1aLH4yvTY4nPDk6eMkF5qU9cSxCQa2VxTm8Ery2IGP L3AV0IwYA/eUxVuIUFaY0XgdkkvrIt9/Um484CSFur4GNb5D9TmYtJ5MePQ8rMlAOCyh ohtfy/CQtjXRFMBQR4S0GDIbhADwe3vAB2Yr07L275k2F2gWn/pfLs3lOsfq1b9n+lFs YKkqxrecdp9OLM5D+u5QIBgG4f0jbDN9teLuAAyHuQgFS2sPluR4uCh+UcdGttqy27+d ge314jN1NSWtt72ngba+zujHzHXm/72A0qp8gmXu+/P3pW5FzbxQ0jXZrwfiXwh8DXdy ZYcw== X-Gm-Message-State: AOAM5311eeVm7KH/J/faz14/zXDl/mYZZYhF3zSKC2RLmQnlozWYRwj7 RmbYkAAHeFbvhkBS8hJDONYAI9Clvo8jDQ== X-Google-Smtp-Source: ABdhPJznJcAyLfCHluZl7bQw0peNEfGxV3iEDMibo4pfZGCg1nZdkZPyZXFsPvj66CfD3c7EkfR2xA== X-Received: by 2002:a05:620a:5ad:: with SMTP id q13mr17574873qkq.135.1607709941407; Fri, 11 Dec 2020 10:05:41 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 07/12] domain_conf: move net device validation to domain_validate.c Date: Fri, 11 Dec 2020 15:05:11 -0300 Message-Id: <20201211180516.1952683-8-danielhb413@gmail.com> In-Reply-To: <20201211180516.1952683-1-danielhb413@gmail.com> References: <20201211180516.1952683-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The next objective is to move virDomainDeviceDefValidate() to domain_validate.c. First let's move all the static helpers. The net device validation functions are used across multiple drivers, so let's move them separately first. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 153 ------------------------------------- src/conf/domain_conf.h | 3 - src/conf/domain_validate.c | 152 ++++++++++++++++++++++++++++++++++++ src/conf/domain_validate.h | 2 + src/libvirt_private.syms | 2 +- src/libxl/libxl_domain.c | 1 + src/libxl/libxl_driver.c | 1 + src/lxc/lxc_driver.c | 1 + src/lxc/lxc_process.c | 1 + src/qemu/qemu_domain.c | 1 + 10 files changed, 160 insertions(+), 157 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bf9d00094c..a541e7bca6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6022,159 +6022,6 @@ virDomainDefHasUSB(const virDomainDef *def) } =20 =20 - -static int -virDomainNetDefValidatePortOptions(const char *macstr, - virDomainNetType type, - const virNetDevVPortProfile *vport, - virTristateBool isolatedPort) -{ - /* - * This function can be called for either a config interface - * object (NetDef) or a runtime interface object (ActualNetDef), - * by calling it with either, e.g., the "type" (what is in the - * config) or the "actualType" (what is determined at runtime by - * acquiring a port from the network). - */ - /* - * port isolation can only be set for an interface that is - * connected to a Linux host bridge (either a libvirt-managed - * network, or plain type=3D'bridge') - */ - if (isolatedPort =3D=3D VIR_TRISTATE_BOOL_YES) { - if (!(type =3D=3D VIR_DOMAIN_NET_TYPE_NETWORK || - type =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - is n= ot supported for network interfaces with type=3D'%s'"), - macstr, virDomainNetTypeToString(type)); - return -1; - } - /* - * also not allowed for anything with setting - * (openvswitch or 802.11Qb[gh]) - */ - if (vport && vport->virtPortType !=3D VIR_NETDEV_VPORT_PROFILE_NON= E) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - is n= ot supported for network interfaces with virtualport type=3D'%s'"), - macstr, virNetDevVPortTypeToString(vport->virtP= ortType)); - return -1; - } - } - return 0; -} - - -int -virDomainActualNetDefValidate(const virDomainNetDef *net) -{ - /* Unlike virDomainNetDefValidate(), which is a static function - * called internally to this file, virDomainActualNetDefValidate() - * is a public function that can be called from a hypervisor after - * it has completely setup the NetDef for use by a domain, - * including possibly allocating a port from the network driver - * (which could change the effective/"actual" type of the NetDef, - * thus changing what should/shouldn't be allowed by validation). - * - * This function should contain validations not specific to a - * particular hypervisor (e.g. whether or not specifying bandwidth - * is allowed for a type of interface), but *not* - * hypervisor-specific things. - */ - char macstr[VIR_MAC_STRING_BUFLEN]; - virDomainNetType actualType =3D virDomainNetGetActualType(net); - const virNetDevVPortProfile *vport =3D virDomainNetGetActualVirtPortPr= ofile(net); - const virNetDevBandwidth *bandwidth =3D virDomainNetGetActualBandwidth= (net); - - virMacAddrFormat(&net->mac, macstr); - - if (virDomainNetGetActualVlan(net)) { - /* vlan configuration via libvirt is only supported for PCI - * Passthrough SR-IOV devices (hostdev or macvtap passthru - * mode) and openvswitch bridges. Otherwise log an error and - * fail - */ - if (!(actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV || - (actualType =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT && - virDomainNetGetActualDirectMode(net) =3D=3D VIR_NETDEV_MACV= LAN_MODE_PASSTHRU) || - (actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE && - vport && vport->virtPortType =3D=3D VIR_NETDEV_VPORT_PROFI= LE_OPENVSWITCH))) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - vlan tag not supported for th= is connection type"), - macstr); - return -1; - } - } - - /* bandwidth configuration via libvirt is not supported for - * hostdev network devices - */ - if (bandwidth && actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("interface %s - bandwidth settings are not suppor= ted " - "for hostdev interfaces"), - macstr); - return -1; - } - - if (virDomainNetDefValidatePortOptions(macstr, actualType, vport, - virDomainNetGetActualPortOption= sIsolated(net)) < 0) { - return -1; - } - - return 0; -} - - -static int -virDomainNetDefValidate(const virDomainNetDef *net) -{ - char macstr[VIR_MAC_STRING_BUFLEN]; - - virMacAddrFormat(&net->mac, macstr); - - if ((net->hostIP.nroutes || net->hostIP.nips) && - net->type !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Invalid attempt to set network interface " - "host-side IP route and/or address info on " - "interface of type '%s'. This is only supported " - "on interfaces of type 'ethernet'"), - virDomainNetTypeToString(net->type)); - return -1; - } - if (net->managed_tap =3D=3D VIR_TRISTATE_BOOL_NO && - net->type !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unmanaged target dev is not supported on " - "interfaces of type '%s'"), - virDomainNetTypeToString(net->type)); - return -1; - } - - if (net->teaming.type =3D=3D VIR_DOMAIN_NET_TEAMING_TYPE_TRANSIENT) { - if (!net->teaming.persistent) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("teaming persistent attribute must be set if = teaming type is 'transient'")); - return -1; - } - } else { - if (net->teaming.persistent) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("teaming persistent attribute not allowed if = teaming type is '%s'"), - virDomainNetTeamingTypeToString(net->teaming.ty= pe)); - return -1; - } - } - - if (virDomainNetDefValidatePortOptions(macstr, net->type, net->virtPor= tProfile, - net->isolatedPort) < 0) { - return -1; - } - - return 0; -} - - static int virDomainHostdevDefValidate(const virDomainHostdevDef *hostdev) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 1c1533ed2f..e35c4206df 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3024,9 +3024,6 @@ bool virDomainDefHasUSB(const virDomainDef *def); =20 bool virDomainDeviceAliasIsUserAlias(const char *aliasStr); =20 -int -virDomainActualNetDefValidate(const virDomainNetDef *net); - static inline bool virDomainObjIsActive(virDomainObjPtr dom) { diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 6632262ca2..6ca4ebb0ea 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -1169,3 +1169,155 @@ virDomainDefValidate(virDomainDefPtr def, =20 return 0; } + + +static int +virDomainNetDefValidatePortOptions(const char *macstr, + virDomainNetType type, + const virNetDevVPortProfile *vport, + virTristateBool isolatedPort) +{ + /* + * This function can be called for either a config interface + * object (NetDef) or a runtime interface object (ActualNetDef), + * by calling it with either, e.g., the "type" (what is in the + * config) or the "actualType" (what is determined at runtime by + * acquiring a port from the network). + */ + /* + * port isolation can only be set for an interface that is + * connected to a Linux host bridge (either a libvirt-managed + * network, or plain type=3D'bridge') + */ + if (isolatedPort =3D=3D VIR_TRISTATE_BOOL_YES) { + if (!(type =3D=3D VIR_DOMAIN_NET_TYPE_NETWORK || + type =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("interface %s - is n= ot supported for network interfaces with type=3D'%s'"), + macstr, virDomainNetTypeToString(type)); + return -1; + } + /* + * also not allowed for anything with setting + * (openvswitch or 802.11Qb[gh]) + */ + if (vport && vport->virtPortType !=3D VIR_NETDEV_VPORT_PROFILE_NON= E) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("interface %s - is n= ot supported for network interfaces with virtualport type=3D'%s'"), + macstr, virNetDevVPortTypeToString(vport->virtP= ortType)); + return -1; + } + } + return 0; +} + + +int +virDomainActualNetDefValidate(const virDomainNetDef *net) +{ + /* Unlike virDomainNetDefValidate(), which is a static function + * called internally to this file, virDomainActualNetDefValidate() + * is a public function that can be called from a hypervisor after + * it has completely setup the NetDef for use by a domain, + * including possibly allocating a port from the network driver + * (which could change the effective/"actual" type of the NetDef, + * thus changing what should/shouldn't be allowed by validation). + * + * This function should contain validations not specific to a + * particular hypervisor (e.g. whether or not specifying bandwidth + * is allowed for a type of interface), but *not* + * hypervisor-specific things. + */ + char macstr[VIR_MAC_STRING_BUFLEN]; + virDomainNetType actualType =3D virDomainNetGetActualType(net); + const virNetDevVPortProfile *vport =3D virDomainNetGetActualVirtPortPr= ofile(net); + const virNetDevBandwidth *bandwidth =3D virDomainNetGetActualBandwidth= (net); + + virMacAddrFormat(&net->mac, macstr); + + if (virDomainNetGetActualVlan(net)) { + /* vlan configuration via libvirt is only supported for PCI + * Passthrough SR-IOV devices (hostdev or macvtap passthru + * mode) and openvswitch bridges. Otherwise log an error and + * fail + */ + if (!(actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV || + (actualType =3D=3D VIR_DOMAIN_NET_TYPE_DIRECT && + virDomainNetGetActualDirectMode(net) =3D=3D VIR_NETDEV_MACV= LAN_MODE_PASSTHRU) || + (actualType =3D=3D VIR_DOMAIN_NET_TYPE_BRIDGE && + vport && vport->virtPortType =3D=3D VIR_NETDEV_VPORT_PROFI= LE_OPENVSWITCH))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("interface %s - vlan tag not supported for th= is connection type"), + macstr); + return -1; + } + } + + /* bandwidth configuration via libvirt is not supported for + * hostdev network devices + */ + if (bandwidth && actualType =3D=3D VIR_DOMAIN_NET_TYPE_HOSTDEV) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("interface %s - bandwidth settings are not suppor= ted " + "for hostdev interfaces"), + macstr); + return -1; + } + + if (virDomainNetDefValidatePortOptions(macstr, actualType, vport, + virDomainNetGetActualPortOption= sIsolated(net)) < 0) { + return -1; + } + + return 0; +} + + +int +virDomainNetDefValidate(const virDomainNetDef *net) +{ + char macstr[VIR_MAC_STRING_BUFLEN]; + + virMacAddrFormat(&net->mac, macstr); + + if ((net->hostIP.nroutes || net->hostIP.nips) && + net->type !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Invalid attempt to set network interface " + "host-side IP route and/or address info on " + "interface of type '%s'. This is only supported " + "on interfaces of type 'ethernet'"), + virDomainNetTypeToString(net->type)); + return -1; + } + if (net->managed_tap =3D=3D VIR_TRISTATE_BOOL_NO && + net->type !=3D VIR_DOMAIN_NET_TYPE_ETHERNET) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unmanaged target dev is not supported on " + "interfaces of type '%s'"), + virDomainNetTypeToString(net->type)); + return -1; + } + + if (net->teaming.type =3D=3D VIR_DOMAIN_NET_TEAMING_TYPE_TRANSIENT) { + if (!net->teaming.persistent) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("teaming persistent attribute must be set if = teaming type is 'transient'")); + return -1; + } + } else { + if (net->teaming.persistent) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("teaming persistent attribute not allowed if = teaming type is '%s'"), + virDomainNetTeamingTypeToString(net->teaming.ty= pe)); + return -1; + } + } + + if (virDomainNetDefValidatePortOptions(macstr, net->type, net->virtPor= tProfile, + net->isolatedPort) < 0) { + return -1; + } + + return 0; +} diff --git a/src/conf/domain_validate.h b/src/conf/domain_validate.h index e89cadab75..d38d2f4e06 100644 --- a/src/conf/domain_validate.h +++ b/src/conf/domain_validate.h @@ -49,3 +49,5 @@ int virDomainDefValidate(virDomainDefPtr def, unsigned int parseFlags, virDomainXMLOptionPtr xmlopt, void *parseOpaque); +int virDomainActualNetDefValidate(const virDomainNetDef *net); +int virDomainNetDefValidate(const virDomainNetDef *net); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 3cbc336bad..d0e548b0a3 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -226,7 +226,6 @@ virDiskNameParse; virDiskNameToBusDeviceIndex; virDiskNameToIndex; virDomainActualNetDefFree; -virDomainActualNetDefValidate; virDomainAudioTypeTypeFromString; virDomainAudioTypeTypeToString; virDomainBlockedReasonTypeFromString; @@ -743,6 +742,7 @@ virDomainConfVMNWFilterTeardown; =20 =20 # conf/domain_validate.h +virDomainActualNetDefValidate; virDomainDefValidate; virDomainDeviceValidateAliasForHotplug; =20 diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 3669b358f6..ab838b317c 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -35,6 +35,7 @@ #include "locking/domain_lock.h" #include "xen_common.h" #include "driver.h" +#include "domain_validate.h" =20 #define VIR_FROM_THIS VIR_FROM_LIBXL =20 diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 6af274cb1b..c2563ef872 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -55,6 +55,7 @@ #include "virnetdevtap.h" #include "cpu/cpu.h" #include "virutil.h" +#include "domain_validate.h" =20 #define VIR_FROM_THIS VIR_FROM_LIBXL =20 diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index b1295e71da..88d3890de7 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -58,6 +58,7 @@ #include "domain_cgroup.h" #include "domain_driver.h" #include "domain_nwfilter.h" +#include "domain_validate.h" #include "virinitctl.h" #include "virnetdev.h" #include "virnetdevtap.h" diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 0f818e2ee0..937e9a3fc1 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -42,6 +42,7 @@ #include "domain_nwfilter.h" #include "viralloc.h" #include "domain_audit.h" +#include "domain_validate.h" #include "virerror.h" #include "virlog.h" #include "vircommand.h" diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 766f76020c..bfb6e23942 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -48,6 +48,7 @@ #include "domain_capabilities.h" #include "domain_driver.h" #include "domain_event.h" +#include "domain_validate.h" #include "virtime.h" #include "virnetdevopenvswitch.h" #include "virstoragefile.h" --=20 2.26.2