tap-bsd.c has no test for Mac OS X
Bug #647793 reported by
Ted Lemon
This bug affects 2 people
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| QEMU |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
The Mac OS X tun/tap driver is equivalent to the FreeBSD driver, but bsd-tap.c uses the NetBSD/OpenBSD driver, which works differently. The fix is easy--just check for __APPLE__ in the same place where you check for FreeBSD in net/tap-bsd.c.
This problem exists in the current git tree, at least as of yesterday afternoon.
To post a comment you must log in.

I've verified that the code still compiles warning-free on v10.5 with this patch applied.
Before:
$ qemu-system-sparc64 -M sun4u -m 2048 -net tap -net nic sparc64: -net tap: Device 'tap' could not be initialized
warning: could not open /dev/tap: no virtual network emulation
qemu-system-
After:
$ qemu-system-sparc64 -M sun4u -m 2048 -net tap -net nic sparc64: -net tap: warning: could not open /dev/tap0 (No such file or directory): no virtual network emulation sparc64: -net tap: Device 'tap' could not be initialized
qemu-system-
qemu-system-
Could you please resubmit it to qemu-devel using git-send-email and a full commit message with Signed-off-by?
If would also be helpful if you could supply instructions for me to properly setup and test this on Mac OS X. Thanks!