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

[Xen-changelog] [qemu-upstream-unstable] tap: Use numbered tap/tun devices on all *BSD OS's



commit 6bbb9d8100c90deb4843bfa3cf36e75b843c495b
Author:     Brad Smith <brad@xxxxxxxxxxxx>
AuthorDate: Sat Aug 3 22:20:41 2013 -0400
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Thu Sep 26 20:53:51 2013 -0500

    tap: Use numbered tap/tun devices on all *BSD OS's
    
    The following patch simplifies the *BSD tap/tun code and makes use of 
numbered
    tap/tun interfaces on all *BSD OS's. NetBSD has a patch in their pkgsrc tree
    to make use of this feature and DragonFly also supports this as well.
    
    Signed-off-by: Brad Smith <brad@xxxxxxxxxxxx>
    Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
    (cherry picked from commit aa4f082f7526d39dac8e2ca64d192d858014ee10)
    
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 net/tap-bsd.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index f61d580..90f8a02 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -44,8 +44,6 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
     struct stat s;
 #endif
 
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
-    defined(__OpenBSD__) || defined(__APPLE__)
     /* if no ifname is given, always start the search from tap0/tun0. */
     int i;
     char dname[100];
@@ -76,15 +74,6 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
                    dname, strerror(errno));
         return -1;
     }
-#else
-    TFR(fd = open("/dev/tap", O_RDWR));
-    if (fd < 0) {
-        fprintf(stderr,
-            "warning: could not open /dev/tap: no virtual network emulation: 
%s\n",
-            strerror(errno));
-        return -1;
-    }
-#endif
 
 #ifdef TAPGIFNAME
     if (ioctl(fd, TAPGIFNAME, (void *)&ifr) < 0) {
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.