Commit 54d697c4 authored by Pekka Pessi's avatar Pekka Pessi

tport_type_udp.c: use IP_MTU_DISCOVER socket option to turn off DF flag

Added check for IP_MTU_DISCOVER in m4/sac-su2.m4

darcs-hash:20080404151504-65a35-fe6a18371e2b2ac525204d8973cb0feab02f304c.gz
parent f44ea4f5
......@@ -162,6 +162,17 @@ int tport_udp_init_primary(tport_primary_t *pri,
}
#endif
#if HAVE_IP_MTU_DISCOVER
{
/* Turn off DF flag on Linux */
int dont = IP_PMTUDISC_DONT;
if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, &dont, sizeof(dont)) < 0) {
SU_DEBUG_3(("setsockopt(%s): %s\n",
"IP_MTU_DISCOVER", su_strerror(su_errno())));
}
}
#endif
#if HAVE_IP_RECVERR
if (ai->ai_family == AF_INET || ai->ai_family == AF_INET6) {
if (setsockopt(s, IPPROTO_IP, IP_RECVERR, &one, sizeof(one)) < 0) {
......
......@@ -317,6 +317,13 @@ AC_DEFINE([HAVE_IP_MULTICAST_LOOP],1,[Define to 1 if you have IP_MULTICAST_LOOP]
#include <sys/socket.h>
#include <netinet/in.h>])
AC_CHECK_DECL([IP_MTU_DISCOVER],
AC_DEFINE([HAVE_IP_MTU_DISCOVER],1,
[Define to 1 if you have IP_MTU_DISCOVER]),,[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>])
AC_CACHE_CHECK([for struct addrinfo],
[ac_cv_struct_addrinfo],[
ac_cv_struct_addrinfo=no
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment