Reuse existing helper function virDomainNetGetActualtype.
Signed-off-by: Chunyan Liu <cyliu(a)suse.com>
---
src/libxl/libxl_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 93c943b..2b77c59 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1445,7 +1445,8 @@ libxlMakeNicList(virDomainDefPtr def, libxl_domain_config
*d_config)
return -1;
for (i = 0; i < nnics; i++) {
- if (l_nics[i]->type == VIR_DOMAIN_NET_TYPE_HOSTDEV)
+ if (virDomainNetGetActualType(l_nics[i])
+ == VIR_DOMAIN_NET_TYPE_HOSTDEV)
continue;
if (libxlMakeNic(def, l_nics[i], &x_nics[nvnics]))
--
2.1.4