[libvirt] [PATCH] qemu: fix missing ifname in qemu argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This patch adds missing ifname, which is a tap name for network/bridge
configuration, in qemu argument of -net. Without this patch, a specified
tap name, e.g., <target dev='tap01'/>, in a domain XML will be ignored.

Thanks,
  ozaki-r

>From feeca4f2cecf5c6836f7aec6e004585f3b855bed Mon Sep 17 00:00:00 2001
From: Ryota Ozaki <ozaki.ryota@xxxxxxxxx>
Date: Tue, 28 Jul 2009 23:46:12 +0900
Subject: [PATCH] qemu: fix missing ifname in qemu argument

---
 src/qemu_conf.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 4fe4e39..48bf928 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -1187,11 +1187,13 @@ qemuBuildHostNetStr(virConnectPtr conn,
     switch (net->type) {
     case VIR_DOMAIN_NET_TYPE_NETWORK:
     case VIR_DOMAIN_NET_TYPE_BRIDGE:
-        if (virAsprintf(str, "%stap%cfd=%s,vlan=%d%s%s",
+        if (virAsprintf(str, "%stap%cfd=%s,vlan=%d%s%s%s%s",
                         prefix ? prefix : "",
                         type_sep, tapfd, vlan,
                         (net->hostnet_name ? ",name=" : ""),
-                        (net->hostnet_name ? net->hostnet_name : "")) < 0) {
+                        (net->hostnet_name ? net->hostnet_name : ""),
+                        (net->ifname ? ",ifname=" : ""),
+                        (net->ifname ? net->ifname : "")) < 0) {
             virReportOOMError(conn);
             return -1;
         }
-- 
1.6.0.6

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]