[Freeswitch-svn] [commit] r8022 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/tport m4

Freeswitch SVN mikej at freeswitch.org
Fri Apr 4 13:39:39 EDT 2008


Author: mikej
Date: Fri Apr  4 13:39:38 2008
New Revision: 8022

Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
   freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4

Log:
Fri Apr  4 11:15:04 EDT 2008  Pekka.Pessi at nokia.com
  * 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



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Fri Apr  4 13:39:38 2008
@@ -1 +1 @@
-Thu Apr  3 18:33:26 EDT 2008
+Fri Apr  4 13:39:32 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c	Fri Apr  4 13:39:38 2008
@@ -162,6 +162,17 @@
   }
 #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) {

Modified: freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4	(original)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4	Fri Apr  4 13:39:38 2008
@@ -317,6 +317,13 @@
 #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



More information about the Freeswitch-svn mailing list