Enable TCP_NODELAY configuration on FreeBSD.
PATCH 1/1 Enable TCP_NODELAY configuration on FreeBSD.
The missing #include <netinet/tcp.h> causes a defined(TCP_NODELAY) to fail. I have added the patch to the FreeBSD ports OpenVPN 2.2.2 and 2.3.0, and confirmed (with strings ... | grep) that the TCP_NODELAY code is now part of the executable on amd64, and results in this log output:
Sat Jan 12 13:39:18 2013 Listening for incoming TCP connection on [undef] Sat Jan 12 13:39:18 2013 Socket flags: TCP_NODELAY=1 succeeded
Obtained from: https://community.openvpn.net/openvpn/ticket/158
Credits to: M. Nottebrock
--- src/openvpn/syshead.h | 4 ++++ 1 file changed, 4 insertions(+)
src/openvpn/syshead.h +4 -0
@@ -307,6 +307,10 @@#include <netinet/ip.h> #endif +#ifdef HAVE_NETINET_TCP_H +#include <netinet/tcp.h> +#endif +#ifdef HAVE_NET_IF_TUN_H #include <net/if_tun.h> #endif
Signature · 1 line
1.8.1
Hi,
Quoted 5 lines · Matthias Andree
The missing #include <
netinet/tcp.h> causes adefined(TCP_NODELAY)to fail. I have added the patch to the FreeBSD ports OpenVPN 2.2.2 and 2.3.0, and confirmed (with strings ... | grep) that theTCP_NODELAYcode is now part of the executable on amd64, and results in this log output:
Quoted 7 lines
Sat Jan 12 13:39:18 2013 Listening for incoming TCP connection on [undef] Sat Jan 12 13:39:18 2013 Socket flags: TCP_NODELAY=1 succeeded
Obtained from: https://community.openvpn.net/openvpn/ticket/158
Credits to: M. NottebrockSigned-off-by Matthias Andree <[email protected]...>
ACK, "obviously logical" - needs a build test across all other platforms to check whether some obscure OS (like "Linux" or "Solaris" or "MinGW") chokes if that header is included now, but I don't expect issues.
2.3.1 and master, I'd say :-)
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]...Am 12.01.2013 21:13, schrieb Gert Doering:
Quoted 11 lines
Hi,
Quoted 8 lines · Matthias Andree
The missing #include <
netinet/tcp.h> causes adefined(TCP_NODELAY)to fail. I have added the patch to the FreeBSD ports OpenVPN 2.2.2 and 2.3.0, and confirmed (with strings ... | grep) that theTCP_NODELAYcode is now part of the executable on amd64, and results in this log output:Sat Jan 12 13:39:18 2013 Listening for incoming TCP connection on [undef] Sat Jan 12 13:39:18 2013 Socket flags: TCP_NODELAY=1 succeeded
Quoted 8 lines
Quoted 4 lines
Obtained from: https://community.openvpn.net/openvpn/ticket/158
Credits to: M. NottebrockSigned-off-by Matthias Andree <[email protected]...>ACK, "obviously logical" - needs a build test across all other platforms to check whether some obscure OS (like "Linux" or "Solaris" or "MinGW") chokes if that header is included now, but I don't expect issues.
No need for non-FreeBSD build tests, this is the wider context
- M. Nottebrock who added the patch to Trac had added the #include in the "#ifdef TARGET_FREEBSD" section so it is invisible to other systems.
Other BSDs already include this header, I presume it was an oversight to omit this from FreeBSD builds, once upon a time.
#ifdef TARGET_FREEBSD
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
#ifdef HAVE_NETINET_IP_H
#include <netinet/ip.h>
#endif
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
#ifdef HAVE_NET_IF_TUN_H
#include <net/if_tun.h>
#endif
#endif /* TARGET_FREEBSD */
Quoted 1 line
2.3.1 and master, I'd say :-)
And 2.2.3 if that branch is still maintained.
Hi,
Quoted 7 lines · Matthias Andree
Quoted 3 lines
ACK, "obviously logical" - needs a build test across all other platforms to check whether some obscure OS (like "Linux" or "Solaris" or "MinGW") chokes if that header is included now, but I don't expect issues.
No need for non-FreeBSD build tests, this is the wider context
- M. Nottebrock who added the patch to Trac had added the #include in the "#ifdefTARGET_FREEBSD" section so it is invisible to other systems.
Ah, thanks, I did not look at the wider context. Indeed, in that case no need to test on other OSes.
(These sections need more cleanup - nexting autoconf-HAVE_ stuff with #ifdef TARGET_XXX is not overly clever, as we know what FreeBSD has and needs... somewhere on the roadmap for 2.4)
[..]
Quoted 2 lines
Quoted 1 line
2.3.1 and master, I'd say :-)
And 2.2.3 if that branch is still maintained.
It won't hurt to include it there as well, yes. I'm not sure we'll do another 2.2 release, but possibly if something "real bad" is found until enough folks have moved to 2.3...
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]...Your patch has been applied to the master and release/2.3 branch.
commit 3e86f688757529f8b33f9e6b49e31ba8d8564c5e (master) commit 0a700901a3bbc97e51a6319580129a131f202889 (release/2.3)
Author: Matthias Andree Date: Sat Jan 12 13:41:17 2013 +0100
Enable TCP_NODELAY configuration on FreeBSD.
Signed-off-by: Matthias Andree <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/7230
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering