On 23/02/12 10:06, Freek Dijkstra wrote: > Reporting that > http://build.openvpn.net/downloads/releases/openvpn-2.3-alpha1.tar.gz > compiles and runs fine for me. > [...snip...] > My recommendation is to: > > 1. Remove the "NOTE: explicit support for IPv6 tun devices is not > provided for this OS"
Please try the attached patch and see if this works better. I've flipped the flag about explicit IPv6 support for OSX/Darwin. Your tests obviously shows the support is present. > 2. If possible, add a message about the cause to the "Cannot allocate > TUN/TAP dev dynamically" message (e.g. "permission denied" or "no tun > interface available" ,...) For now, in the patch, I've just added a bit more helpful hint. We probably could do some more checks to give a more exact error. But as this is highly platform specific, I didn't dare touching the OSX code more as I don't have access to that platform at all. kind regards, David Sommerseth
From a01f6ff9fb8901048cd9aacdd665affef082084a Mon Sep 17 00:00:00 2001 From: David Sommerseth <dav...@redhat.com> List-Post: openvpn-devel@lists.sourceforge.net Date: Thu, 23 Feb 2012 10:43:04 +0100 Subject: [PATCH] Fix errornous IPv6 warning for OSX and enhance TUN/TAP allocation error OSX/Darwin supports IPv6 in its TUN/TAP driver. Flipped the flag indicating this support. Further if the TUN/TAP driver in the OS is not loaded, the allocation of TUN/TAP devices will fail. And when using dynamic allocation (when configuring tun instead of tun0), OpenVPN will exit saying "dynamic allocation failed". Rather be helpful and give a hint why this might have failed. Signed-off-by: David Sommerseth <dav...@redhat.com> --- tun.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tun.c b/tun.c index c92c0d7..55f894a 100644 --- a/tun.c +++ b/tun.c @@ -1321,7 +1321,7 @@ open_tun_generic (const char *dev, const char *dev_type, const char *dev_node, msg (D_READ_WRITE | M_ERRNO, "Tried opening %s (failed)", tunname); } if (!dynamic_opened) - msg (M_FATAL, "Cannot allocate TUN/TAP dev dynamically"); + msg (M_FATAL, "Cannot allocate TUN/TAP dev dynamically. Is the TUN/TAP driver loaded?"); } /* * explicit unit number specified @@ -2451,7 +2451,7 @@ read_tun (struct tuntap* tt, uint8_t *buf, int len) void open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tuntap *tt) { - open_tun_generic (dev, dev_type, dev_node, false, true, tt); + open_tun_generic (dev, dev_type, dev_node, true, true, tt); } void -- 1.7.4.4
signature.asc
Description: OpenPGP digital signature