[PATCH] Make umlConnectTapDevice ask brAddTap for a persistent tap device.

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

 



This patch does two things:

 * It makes umlConnectTapDevice ask brAddTap for a persistent tap by
   passing it a NULL tapfd argument.
 * Stops umlConnectTapDevice from immediately dismantling the bridge
   it just set up.

Signed-off-by: Soren Hansen <soren@xxxxxxxxxxx>
---
 src/uml/uml_conf.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c
index bc8cbce..1623a78 100644
--- a/src/uml/uml_conf.c
+++ b/src/uml/uml_conf.c
@@ -112,7 +112,6 @@ umlConnectTapDevice(virDomainNetDefPtr net,
                     const char *bridge)
 {
     brControl *brctl = NULL;
-    int tapfd = -1;
     int template_ifname = 0;
     int err;
     unsigned char tapmac[VIR_MAC_BUFLEN];
@@ -140,7 +139,7 @@ umlConnectTapDevice(virDomainNetDefPtr net,
                         &net->ifname,
                         tapmac,
                         0,
-                        &tapfd))) {
+                        NULL))) {
         if (err == ENOTSUP) {
             /* In this particular case, give a better diagnostic. */
             umlReportError(VIR_ERR_INTERNAL_ERROR,
@@ -164,7 +163,6 @@ umlConnectTapDevice(virDomainNetDefPtr net,
             VIR_FREE(net->ifname);
         goto error;
     }
-    close(tapfd);
 
     brShutdown(brctl);
 
-- 
1.7.0.4

--
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]