summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlasdair McLeay <alasdair.mcleay@me.com>2013-05-09 19:44:30 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-05-24 16:33:48 +0200
commitd73fe37e7bab4ef06b94c48b2a8d8952c03619d4 (patch)
tree6561ebe5b1b61fa248a11be7cfeaaeda167f0d54 /net
parent64afc2b4d48fb21e085517c38a59a3f61a11283c (diff)
downloadqemu-d73fe37e7bab4ef06b94c48b2a8d8952c03619d4.tar.gz
qemu-d73fe37e7bab4ef06b94c48b2a8d8952c03619d4.tar.bz2
qemu-d73fe37e7bab4ef06b94c48b2a8d8952c03619d4.zip
net: support for bridged networking on Mac OS X
tun tap can be implemented on Mac OS X using http://tuntaposx.sourceforge.net 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: http://forum.gns3.net/post17679.html#p17679 And also as used in the MacPorts installation: https://trac.macports.org/browser/trunk/dports/emulators/qemu/files/patch-net-tap-interface.diff Signed-off-by: Alasdair McLeay <alasdair.mcleay@me.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/tap-bsd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index bcdb2682b5..f61d580963 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;
#endif
-#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];