OpenVPN: how to enable TCP nodelay?

hazynrg said:
When is HAVE_SETSOCKOPT supposed to be defined?

I don't know.

hazynrg said:
How may I set it?

You may define it once you make OpenVPN from the ports:

# cd /usr/ports/security/openvpn
# make CFLAGS="-DHAVE_SETSOCKOPT"
# make install clean

I cannot tell, whether this gives to you the desired effect, though.
 
Thank you for your reply.

I was on the wrong way, HAVE_SETSOCKOPT is actually defined in "config.h"

I think the problem is TCP_NODELAY which is defined in the <netinet/tcp.h> header.

While having a look at "syshead.h", I discovered that it won't include <netinet/tcp.h>:

Code:
#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_NET_IF_TUN_H
#include <net/if_tun.h>
#endif

#endif /* TARGET_FREEBSD */

I will try to include it tomorrow...
 
Back
Top