[asterisk-commits] kpfleming: trunk r45029 - in /trunk: ./
include/asterisk/ main/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Oct 13 08:47:43 MST 2006
Author: kpfleming
Date: Fri Oct 13 10:47:42 2006
New Revision: 45029
URL: http://svn.digium.com/view/asterisk?rev=45029&view=rev
Log:
Merged revisions 45027 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r45027 | kpfleming | 2006-10-13 10:41:14 -0500 (Fri, 13 Oct 2006) | 2 lines
use a configure script test for PMTU discovery control instead of just assuming it's available on Linux
........
Modified:
trunk/ (props changed)
trunk/configure
trunk/configure.ac
trunk/include/asterisk/autoconfig.h.in
trunk/main/utils.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?rev=45029&r1=45028&r2=45029&view=diff
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Fri Oct 13 10:47:42 2006
@@ -14429,6 +14429,93 @@
fi
+
+ if test "x${PBX_IP_MTU_DISCOVER}" != "x1" -a "${USE_IP_MTU_DISCOVER}" != "no"; then
+ { echo "$as_me:$LINENO: checking for IP_MTU_DISCOVER in netinet/in.h" >&5
+echo $ECHO_N "checking for IP_MTU_DISCOVER in netinet/in.h... $ECHO_C" >&6; }
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${IP_MTU_DISCOVER_DIR}" != "x"; then
+ IP_MTU_DISCOVER_INCLUDE= "-I${IP_MTU_DISCOVER_DIR}/include"
+ fi
+ CPPFLAGS="${CPPFLAGS} ${IP_MTU_DISCOVER_INCLUDE}"
+
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netinet/in.h>
+int
+main ()
+{
+int foo = IP_MTU_DISCOVER;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ PBX_IP_MTU_DISCOVER=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IP_MTU_DISCOVER 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IP_MTU_DISCOVER_VERSION
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="${saved_cppflags}"
+ fi
+
+
if test "${ac_cv_header_libkern_OSAtomic_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for libkern/OSAtomic.h" >&5
echo $ECHO_N "checking for libkern/OSAtomic.h... $ECHO_C" >&6; }
Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=45029&r1=45028&r2=45029&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Oct 13 10:47:42 2006
@@ -299,6 +299,8 @@
AST_C_DEFINE_CHECK([RTLD_NOLOAD], [RTLD_NOLOAD], [dlfcn.h])
+AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [IP_MTU_DISCOVER], [netinet/in.h])
+
AC_CHECK_HEADER([libkern/OSAtomic.h],
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?rev=45029&r1=45028&r2=45029&view=diff
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Fri Oct 13 10:47:42 2006
@@ -168,6 +168,12 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+
+/* Define if your system has the IP_MTU_DISCOVER headers. */
+#undef HAVE_IP_MTU_DISCOVER
+
+/* Define IP_MTU_DISCOVER headers version */
+#undef HAVE_IP_MTU_DISCOVER_VERSION
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
Modified: trunk/main/utils.c
URL: http://svn.digium.com/view/asterisk/trunk/main/utils.c?rev=45029&r1=45028&r2=45029&view=diff
==============================================================================
--- trunk/main/utils.c (original)
+++ trunk/main/utils.c Fri Oct 13 10:47:42 2006
@@ -987,10 +987,10 @@
void ast_enable_packet_fragmentation(int sock)
{
-#ifdef __linux__
+#if defined(HAVE_IP_MTU_DISCOVER)
int val = IP_PMTUDISC_DONT;
if (setsockopt(sock, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val)))
ast_log(LOG_WARNING, "Unable to disable PMTU discovery. Large UDP packets may fail to be delivered when sent from this socket.\n");
-#endif
-}
+#endif /* HAVE_IP_MTU_DISCOVER */
+}
More information about the asterisk-commits
mailing list