OpenVPN 2.3-alpha1 preview 1 installer now available
Hi all,
A preview of OpenVPN 2.3-alpha1 installer for Windows is now available here:
<http://build.openvpn.net/downloads/snapshots/openvpn-2.3-alpha1-preview1-install.exe>
It's essentially the same as the to-be 2.3-alpha1, except that
- the installer is not signed
- the new OpenVPN-GUI is not signed
The TAP-driver _is_ signed, so it should install just fine on Windows Vista/7. The official 2-3-alpha1 release will follow as soon as signatures are taken care of. Hopefully this happens later today or some time tomorrow.
A full list of changes is available here:
<http://pastebin.com/raw.php?i=6EPqp7y5>
Any help in testing this before release is _much_ appreciated!
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
2012/2/21 Samuli Seppänen <[email protected]...>
Quoted 4 lines
A preview of OpenVPN 2.3-alpha1 installer for Windows is now available here:
<http://build.openvpn.net/downloads/snapshots/openvpn-2.3-alpha1-preview1-install.exe>
I realize that this post was aimed at Windows, but building on OS X 10.6.8 (for Tunnelblick) fails with the following:
gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../include -no-cpp-precomp
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Os
-mmacosx-version-min=10.4 -arch i386 -c socket.c
In file included from buffer.h:29,
from socket.h:28,
from socket.c:33:error.h:172:5: warning: #warning this compiler appears to lack vararg macros which will cause a significant degradation in efficiency (you can ignore this warning if you are using LCLINT)socket.c: In function 'create_socket_udp6':
socket.c:902: error: 'IPV6_RECVPKTINFO' undeclared (first use in this function) socket.c:902: error: (Each undeclared identifier is reported only once socket.c:902: error: for each function it appears in.)
make[4]: *** [socket.o] Error 1
The error is the main problem, of course, but I'm not sure what to make of the warning, which appears in the compilation of (almost?) all modules -- it's hard to believe that gcc 4.0 doesn't have vararg macros, since they are a feature of GNU C!
The full compilation log is available at http://pastebin.com/DaPnQZCH
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 13 lines · Jonathan K. Bullard
2012/2/21 Samuli Seppänen <[email protected]...>
Quoted 6 lines
A preview of OpenVPN 2.3-alpha1 installer for Windows is now available here:
<http://build.openvpn.net/downloads/snapshots/openvpn-2.3-alpha1-preview1-install.exe>
I realize that this post was aimed at Windows, but building on OS X 10.6.8 (for Tunnelblick) fails with the following:
gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../include -no-cpp-precomp
(quoted diff) +0
-2-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Os -mmacosx-version-min=10.4 -arch i386 -c socket.c In file included from
Quoted 4 lines
buffer.h:29, from socket.h:28, from socket.c:33: error.h:172:5:
warning: #warning this compiler appears to lack vararg macros which will cause a significant degradation in efficiency (you can ignore this warning if you are using LCLINT)
This I don't understand, as this isn't exactly new code. The warning in error.h:172 has been in the source tree since September 2005. I suspect this to be somehow compiler related.
I'm compiling OpenVPN regularly on Fedora 14, which uses:
$ gcc --version gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
Quoted 5 lines
socket.c: In function 'create_socket_udp6': socket.c:902: error:
'IPV6_RECVPKTINFO' undeclared (first use in this function) socket.c:902: error: (Each undeclared identifier is reported only once socket.c:902: error: for each function it appears in.) make[4]:
*** [socket.o] Error 1
This seems to be the main reason why it chokes. I've Cc'ed Juan Jo, who introduced this change. It's related to the new IPv6 transport feature.
JJO: Can you please see if you can figure out this?
Quoted 4 lines
The error is the main problem, of course, but I'm not sure what to make of the warning, which appears in the compilation of (almost?) all modules -- it's hard to believe that gcc 4.0 doesn't have vararg macros, since they are a feature of GNU C!
Agreed, there is something odd going on here. But I don't have any OSX boxes available and lack some knowledge about the OSX build environment, so it's really hard to figure out immediately. I hope others with OSX can have a look at what's causing this.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9E9/YACgkQDC186MBRfrrUdgCbB3IL4kKjMgryggfqSwhjcKap wF4AoKR6WXY9dp/SEBFZS8wow/tPv49L
=w4Eu
-----END PGP SIGNATURE-----
Hi Jonathan,
This does not really address the issue you're having, but could you try if using Alon's new buildsystem helps:
<https://github.com/alonbl/openvpn/downloads>
You need to copy the "generic" directory to OpenVPN source directory, cd to it and do a ./build. There's some additional info in the README file.
I used it earlier today successfully to compile native + 32/64-bit Windows binaries on Ubuntu 11.10. It should also work fine on MacOS X if all dependencies are in place:
<http://thread.gmane.org/gmane.network.openvpn.devel/5527>
Samuli
Quoted 28 lines
Quoted 4 lines
A preview of OpenVPN 2.3-alpha1 installer for Windows is now available here:
<http://build.openvpn.net/downloads/snapshots/openvpn-2.3-alpha1-preview1-install.exe>
I realize that this post was aimed at Windows, but building on OS X 10.6.8 (for Tunnelblick) fails with the following:
gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../include -no-cpp-precomp
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Os
-mmacosx-version-min=10.4 -arch i386 -csocket.c
In file included from buffer.h:29,from socket.h:28, from socket.c:33:error.h:172:5: warning: #warning this compiler appears to lack vararg macros which will cause a significant degradation in efficiency (you can ignore this warning if you are using LCLINT)
socket.c: In function 'create_socket_udp6':
socket.c:902: error: 'IPV6_RECVPKTINFO' undeclared (first use in this function) socket.c:902: error: (Each undeclared identifier is reported only once socket.c:902: error: for each function it appears in.)
make[4]: *** [socket.o] Error 1The error is the main problem, of course, but I'm not sure what to make of the warning, which appears in the compilation of (almost?) all modules -- it's hard to believe that gcc 4.0 doesn't have vararg macros, since they are a feature of GNU C!
The full compilation log is available at http://pastebin.com/DaPnQZCH
This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms. Please try building again after applying the patch below.
--- socket.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
socket.c +1 -0
@@ -893,8 +893,13 @@ create_socket_udp6 (const unsigned int flags)else if (flags &SF_USE_IP_PKTINFO ) {int pad =1 ; +#ifndef IPV6_RECVPKTINFO /* Some older Darwin platforms require this
*/
+ if (setsockopt (sd, IPPROTO_IPV6, IPV6_PKTINFO,
+ (void*)&pad, sizeof(pad)) < 0)
+#else
if (setsockopt (sd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
(void*)&pad, sizeof(pad)) < 0)
+#endif
msg(M_SOCKERR, "UDP: failed setsockopt for IPV6_RECVPKTINFO");
} #endif
--
1.7.5.4
Quoted 77 lines · David Sommerseth
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 12 lines · Jonathan K. Bullard
2012/2/21 Samuli Seppänen <[email protected]...>
Quoted 4 lines
ApreviewofOpenVPN2.3-alpha1installerfor Windows isnow availablehere:
<http://build.openvpn.net/downloads/snapshots/openvpn-2.3-alpha1-previ...>
I realize that this post was aimed at Windows, but building on OS X 10.6.8 (for Tunnelblick) fails with the following:
gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../include -no-cpp-precomp
(quoted diff) +0
-2-isysroot /Developer/SDKs/MacOSX10.4u.sdk -Os -mmacosx-version-min=10.4 -arch i386 -c socket.c In file included fromQuoted 4 lines
buffer.h:29, from socket.h:28, from socket.c:33: error.h:172:5:
warning: #warning this compiler appears to lack vararg macros which will cause a significant degradation in efficiency (you can ignore this warning if you are using LCLINT)This I don't understand, as this isn't exactly new code. The warning in error.h:172 has been in the source tree since September 2005. I suspect this to be somehow compiler related.
I'm compilingOpenVPNregularly on Fedora 14, which uses:
$ gcc --version gcc (GCC) 4.5.120100924 (Red Hat 4.5.1-4)Quoted 5 lines
socket.c: In function 'create_socket_udp6': socket.c:902: error:
'IPV6_RECVPKTINFO' undeclared (first use in this function) socket.c:902: error: (Each undeclared identifier is reported only once socket.c:902: error: for each function it appears in.) make[4]:
*** [socket.o] Error1This seems to be the main reason why it chokes. I've Cc'ed Juan Jo, who introduced this change. It's related to the new IPv6 transport feature.
JJO: Can you please see if you can figure out this?
Quoted 4 lines
The error is the main problem, of course, but I'm not sure what to make of the warning, which appears in the compilation of (almost?) all modules -- it's hard to believe that gcc 4.0 doesn't have vararg macros, since they are a feature of GNU C!
Agreed, there is something odd going on here. But I don't have any OSX boxesavailableand lack some knowledge about the OSX build environment, so it's really hard to figure out immediately. I hope others with OSX can have a look at what's causing this.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/iEYEARECAAYFAk9E9/YACgkQDC186MBRfrrUdgCbB3IL4kKjMgryggfqSwhjcKap wF4AoKR6WXY9dp/SEBFZS8wow/tPv49L
=w4Eu
-----END PGP SIGNATURE-------------------------------------------------------------------------------- ---
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________Openvpn-devel mailing [email protected]...://lists.sourceforge.net/lists/listinfo/openvpn-devel
Maybe you already know this, but I want to point it out just in case; pkcs11-helper library is not included in OS X. You need to build that first, if you want to include support for this in openvpn.
Op 22 februari 2012 23:23 heeft Jonathan K. Bullard <[email protected]...> het volgende geschreven:
Quoted 17 lines · debrabander
Quoted 4 lines
This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms. Please try building again after applying the patch below.
Your patch fixed the error, so thank you very much!
I gather the patch was from a slightly different version of
socket.c, since the line numbers were a few lines off of what I have. But it seemed to work.Now I need to figure out what is causing the warnings about vararg, a bunch of "differ in signedness" warnings, and a "ld: library not found for -lpkcs11-helper" error. I'll try using more recent SDKs.
Thanks again.
Reporting that
http://build.openvpn.net/downloads/releases/openvpn-2.3-alpha1.tar.gz
compiles and runs fine for me.
(after I manully installed lzo manually)
Running Mac OS 10.7.2:
% uname -mrsv
Darwin 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
The only comment I have is some confusing messages on the command line. The first time I ran
% openvpn --config config.conf
it failed with:
NOTE: explicit support for IPv6 tun devices is not provided for this OS Cannot allocate TUN/TAP dev dynamically
It turns out I just forgot to run openvpn as root, and the first message seems incorrect (IPv6 does seem to work fine, see below):
% sudo openvpn --config config.conf
...
NOTE: explicit support for IPv6 tun devices is not provided for this OS TUN/TAP device /dev/tun0 opened
...
My recommendation is to:
1. Remove the "NOTE: explicit support for IPv6 tun devices is not provided for this OS"
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" ,...)
Regards,
Freek Dijkstra
Indeed IPv6 seems to work:
...do_ifconfig, tt->ipv6=1, tt->did_ifconfig_ipv6_setup=1 /sbin/ifconfig tun0 inet6 2001:610:767:1975::4/64 add_route_ipv6(2001:610:767:fd::/64 -> 2001:610:767:1975::1 metric 0) dev tun0
...
% route get -inet6 2001:610:767:fd::70
route to: 2001:610:767:fd::70
destination: 2001:610:767:fd::
mask: ffff:ffff:ffff:ffff::
interface: tun0
And:
% ping6 2001:610:767:fd::70
PING6(56=40+8+8 bytes) 2001:610:767:1975::4 --> 2001:610:767:fd::70 16 bytes from 2001:610:767:fd::70, icmp_seq=0 hlim=63 time=7.678 ms 16 bytes from 2001:610:767:fd::70, icmp_seq=1 hlim=63 time=5.728 ms 16 bytes from 2001:610:767:fd::70, icmp_seq=2 hlim=63 time=4.167 ms --- 2001:610:767:fd::70 ping6 statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
Quoted 2 lines
1. Remove the "NOTE: explicit support for IPv6 tun devices is not provided for this OS"
On second thought, I did install tuntaposx manually.
Indeed, when I manually remove the tun.kext kernel extension, openvpn fails (as expected) with
Cannot allocate TUN/TAP dev dynamically
So Mac OS X apparently still does not come with a bundled tun or tap device. A note about that may be useful, but that applies to both IPv4 and IPv6, right?
If it is not possible to make the "Cannot allocate TUN/TAP dev dynamically" more explicit about the underlying cause, perhaps the NOTE can be changed to "NOTE: explicit support for tun devices is not provided for this OS."
Regards,
Freek
Quoted 4 lines · Freek Dijkstra
Reporting that
http://build.openvpn.net/downloads/releases/openvpn-2.3-alpha1.tar.gz
compiles and runs fine for me.
[...snip...]
Quoted 4 lines
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.
Quoted 3 lines
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 <[email protected]...>
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.
--- tun.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
tun.c +2 -2
@@ -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
Signature · 1 line
1.7.4.4
Hi,
Quoted 4 lines · Freek Dijkstra
Running Mac OS 10.7.2:
% uname -mrsv
Darwin 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64x86_64
[..]
Quoted 1 line
NOTE: explicit support for IPv6 tun devices is not provided for this OS
Huh. No idea where that is coming from. (Well, I know where it is coming from, but it really shouldn't be printed, as IPv6 on OSX is fully supported...)
I'll look into it and send a patch.
Quoted 1 line
Cannot allocate TUN/TAP dev dynamically
That one is related to no tun/tap driver loaded. In my tests, I always fired up tunnelblick first to make it load the driver :-) and then it works from the cli as well.
Quoted 4 lines
My recommendation is to:
1. Remove the "NOTE: explicit support for IPv6 tun devices is not provided for this OS"
ACK.
Quoted 3 lines
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" ,...)
I'll look into it. (Been in that same situation with tap on *BSD, where you need to kldload if_tap first...)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Hi,
Quoted 9 lines · David Sommerseth
[...snip...]
Quoted 4 lines
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.
I've added it, so it's definitely there :-) seems I just overlooked the message. And the "OSX platform cleanup" didn't happen yet.
Quoted 3 lines
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.
I have a 10.5 box here, which is sufficient to do simple changes.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Hi,
Quoted 3 lines · David Sommerseth
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.
ACK. I just checked the code, and the missing "true" there is just an oversight, OSX is considered "full IPv6 support". I've considered ripping out the whole check, error message and argument to open_tun_generic(), but there actually are three cases left where "no IPv6 support" is true (old Linux, old NetBSD, "we don't really know anything about this platform"), so let's stick to the simple bit-flip for now :)
Also ACK on the added text to the warning message.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 10 lines · debrabander
This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms. Please try building again after applying the patch below.
Signed-off-by Frank de Brabander <[email protected]...> --- socket.c| 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
socket.c index 1a772af..6337900 100644 --- renamed from socket.c +0
-0
Quoted 8 lines
a/socket.c+++b/socket.c@@ -893,8 +893,13 @@create_socket_udp6(const unsigned int flags) else if (flags &SF_USE_IP_PKTINFO) { int pad = 1; +#ifndefIPV6_RECVPKTINFO/* Some older Darwin platforms
require this */ + if (setsockopt (sd,IPPROTO_IPV6,IPV6_PKTINFO, + (void*)&pad, sizeof(pad)) < 0) +#else if
(setsockopt (sd,IPPROTO_IPV6,IPV6_RECVPKTINFO, (void*)&pad, sizeof(pad)) < 0) +#endifmsg(M_SOCKERR, "UDP: failed setsockopt for IPV6_RECVPKTINFO"); } #endif
Right now, I'm a bit sceptic to this patch, as the JJO fixed a bug related to the --multihome feature by moving over to IPV6_RECVPKTINFO
commit 5d6dbb03776de4d38f45e429ef674313a2bda8cc
Author: JuanJo Ciarlante <[email protected]...> Date: Sun Feb 6 09:52:46 2011 +0100
* fix --multihome for ipv6: IPV6_RECVPKTINFO
- setsockopt IPV6_RECVPKTINFO (not IPV6_PKTINFO!) <<<< [1]
- do check for setsockopt() failures
[1] This is why I'm nervous for this patch.
If we can confirm that --multihome works as expected on platforms without
IPV6_RECVPKTINFO, then I'm fine with this patch. Otherwise, we need to
figure out how to make --multihome work too.
JJO, please have a look at this.
kind regards
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9H4XMACgkQDC186MBRfrqpVwCfdX8B62YecoVSdXUQ17K0Ra4o FC8AoKn+1eI3NNtAFrEs71TjSWXFf2Po
=yRcC
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 32 lines · David Sommerseth
Quoted 11 lines · debrabander
This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms. Please try building again after applying the patch below.
Signed-off-by Frank de Brabander <[email protected]...> ---
socket.c| 5 +++++ 1 files changed, 5 insertions(+), 0
deletions(-)socket.c index 1a772af..6337900 100644 --- renamed from socket.c +0
-0Quoted 8 lines
a/socket.c+++b/socket.c@@ -893,8 +893,13 @@create_socket_udp6(const unsigned int flags) else if (flags &SF_USE_IP_PKTINFO) { int pad = 1; +#ifndefIPV6_RECVPKTINFO/* Some older Darwin
platforms require this */ + if (setsockopt (sd,IPPROTO_IPV6,IPV6_PKTINFO, + (void*)&pad, sizeof(pad)) < 0) +#else if
(setsockopt (sd,IPPROTO_IPV6,IPV6_RECVPKTINFO, (void*)&pad, sizeof(pad)) < 0) +#endifmsg(M_SOCKERR, "UDP: failed setsockopt for IPV6_RECVPKTINFO"); } #endifRight now, I'm a bit sceptic to this patch, as the JJO fixed a bug related to the --multihome feature by moving over to
IPV6_RECVPKTINFOcommit
5d6dbb03776de4d38f45e429ef674313a2bda8ccAuthor: JuanJo
Ciarlante <[email protected]...> Date: Sun Feb 6 09:52:46 2011 +0100* fix --multihome for ipv6:
IPV6_RECVPKTINFO- setsockoptIPV6_RECVPKTINFO(notIPV6_PKTINFO!) <<<< [1] - do check forsetsockopt()failures
Quoted 7 lines
[1] This is why I'm nervous for this patch.
If we can confirm that --multihome works as expected on platforms without
IPV6_RECVPKTINFO, then I'm fine with this patch. Otherwise, we need to figure out how to make --multihome work too.JJO, please have a look at this.
(somehow JJO fell off the Cc list; re-adding)
Gert and I discussed this a little bit further. We are concerned about breaking --multihome. But we're also not sure how important that feature is on OSX. The use case is server setups with UDP and who use either
- --proto udp6 to accept incoming IPv4 and IPv6 traffic - or accepting traffic from multiple IPv4 (or IPv6) addresses.
So if someone could test this patch on OSX which is lacking IPV6_RECVPKTINFO, setting up a test server with --multihome and --proto udp6 and test incomming IPv4 and IPv6 traffic, especially simultaneously (2-3 IPv4 and 1-2 IPv6 clients at the same time). If this works, please report back to the mailing list.
The second test would be to see how this setup would work _without_
- --multihome. And then document the test results here too.
If all this works fine, then we don't need to worry - and I'll pull this patch in instantly. But if it does not and we don't get a good fix at some point, we need to consider if we will allow --multihome to break on OSX. A related question to this is, how many do use the server features
in OpenVPN on OSX? Not being able to build on OSX is also not a real
option.
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9LVTUACgkQDC186MBRfrqKcQCdF/9/A1XIDgeTh8H+5Wv4xoZI aQMAn11Y0miv3LjH271SF0GKxPW9OVfQ
=09kn
-----END PGP SIGNATURE-----
Hi,
coming back to this after quite some time, trying to build on OSX 10.5...
Quoted 29 lines · debrabander
This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms. Please try building again after applying the patch below.
Signed-off-by Frank de Brabander <[email protected]...>--- socket.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)socket.c +5
-0@@ -893,8 +893,13 @@ create_socket_udp6 (const unsigned int flags)else if (flags &SF_USE_IP_PKTINFO ) {int pad =1 ; +#ifndef IPV6_RECVPKTINFO /* Some older Darwin platforms require this */ +if (setsockopt (sd,IPPROTO_IPV6 ,IPV6_PKTINFO , + (void *)&pad,sizeof (pad)) <0 ) +#elseif (setsockopt (sd,IPPROTO_IPV6 ,IPV6_RECVPKTINFO , (void*)&pad, sizeof(pad)) < 0) +#endif msg (M_SOCKERR ,"UDP: failed setsockopt for IPV6_RECVPKTINFO" ); }
Quoted 3 lines
#endif
--
1.7.5.4
I think the patch is fine, and I now understand why :-)
IPV6_PKTINFO is part of the "extended socket API" defined in RFC2292. That RFC used IPV6_PKTINFO both for receiving the destination IPv6 address in UDP packets, and for setting the source address for outgoing packets.
RFC2292 was updated by RFC3542, which renamed the "receive" function to IPV6_RECVPKTINFO, leaving the "sending" function as IPV6_PKTINFO - and, subsequently, in FreeBSD they have different "setsockopt()" opcodes.
So, on a system that has *both*, we need to use IPV6_RECVPKTINFO for receving (turning it on with setsockopt) to make --multihome work, and IPV6_PKTINFO for sending (which we don't actually do).
On a system that only has IPV6_PKTINFO, because it's API only implements 2292 (MacOS up until 10.6), use IPV6_PKTINFO for setsockopt().
Now, the interesting question is whether a 10.5-compiled openvpn.exe will behave correctly under 10.7 if --multihome is active...
Regarding the patch: I hereby ACK, and would ask David to include a reference to RFC2292 and RFC3542 in the commit log, so others can find this information more easily.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 10 lines · debrabander
This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms. Please try building again after applying the patch below.
Signed-off-by Frank de Brabander <[email protected]...>--- socket.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied to master, with an extended commit note.
commit fe8a7f0cc25e6b9492bf0613025873c7a5f46ca5
Author: Frank de Brabander <[email protected]...> Date: Wed Feb 22 11:49:15 2012 -0800
Fix reported compile issues on OSX 10.6.8
This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms.
[ Additional review note from Gert Doering:
IPV6_PKTINFO is part of the "extended socket API" defined in RFC2292. That RFC used IPV6_PKTINFO both for receiving the destination IPv6 address in UDP packets, and for setting the source address for outgoing packets.
RFC2292 was updated by RFC3542, which renamed the "receive" function to IPV6_RECVPKTINFO, leaving the "sending" function as IPV6_PKTINFO - and, subsequently, in FreeBSD they have different "setsockopt()" opcodes.
So, on a system that has *both*, we need to use IPV6_RECVPKTINFO for receving (turning it on with setsockopt) to make --multihome work, and IPV6_PKTINFO for sending (which we don't actually do).
On a system that only has IPV6_PKTINFO, because it's API only implements 2292 (MacOS up until 10.6), use IPV6_PKTINFO for setsockopt().
Now, the interesting question is whether a 10.5-compiled openvpn.exe will behave correctly under 10.7 if --multihome is active...
]
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/5591
kind regards,
David Sommerseth