[Top][All Lists]

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

[Qemu-devel] [PATCH 1/2] net: support for bridged networking on Mac OS X

From: Stefan Hajnoczi
Subject: [Qemu-devel] [PATCH 1/2] net: support for bridged networking on Mac OS X
Date: Fri, 24 May 2013 16:38:14 +0200

From: Alasdair McLeay <address@hidden>

tun tap can be implemented on Mac OS X using

It behaves in the same way as FreeBSD/OpenBSD implementations, but Qemu
needs a patch to use the OpenBS/FreeBSD code.

As per the patch listed in this forum thread:

And also as used in the MacPorts installation:

Signed-off-by: Alasdair McLeay <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
 net/tap-bsd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index bcdb268..f61d580 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -44,7 +44,8 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
     struct stat s;
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
+#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];

reply via email to

[Prev in Thread] Current Thread [Next in Thread]