[asterisk-commits] kpfleming: branch 1.4 r45027 - in /branches/1.4:
./ include/asterisk/ main/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Oct 13 08:41:15 MST 2006
Author: kpfleming
Date: Fri Oct 13 10:41:14 2006
New Revision: 45027
URL: http://svn.digium.com/view/asterisk?rev=45027&view=rev
Log:
use a configure script test for PMTU discovery control instead of just assuming it's available on Linux
Modified:
branches/1.4/configure
branches/1.4/configure.ac
branches/1.4/include/asterisk/autoconfig.h.in
branches/1.4/main/utils.c
Modified: branches/1.4/configure
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure?rev=45027&r1=45026&r2=45027&view=diff
==============================================================================
--- branches/1.4/configure (original)
+++ branches/1.4/configure Fri Oct 13 10:41:14 2006
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 43997 .
+# From configure.ac Revision: 44055 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.60a.
#
@@ -14348,6 +14348,76 @@
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
+{ echo "$as_me:$LINENO: checking for IP_MTU_DISCOVER" >&5
+echo $ECHO_N "checking for IP_MTU_DISCOVER... $ECHO_C" >&6; }
+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 conftest$ac_exeext
+if { (ac_try="$ac_link"
+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_link") 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_exeext'
+ { (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; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IP_MTU_DISCOVER 1
+_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_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
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: branches/1.4/configure.ac
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure.ac?rev=45027&r1=45026&r2=45027&view=diff
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Fri Oct 13 10:41:14 2006
@@ -296,6 +296,15 @@
AC_MSG_RESULT(no)
)
+AC_MSG_CHECKING(for IP_MTU_DISCOVER)
+AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([#include <netinet/in.h>],
+ [int foo = IP_MTU_DISCOVER;]),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_IP_MTU_DISCOVER], 1, [Define to 1 if your system has PMTU discovery on UDP sockets.]),
+ AC_MSG_RESULT(no)
+)
+
AC_CHECK_HEADER([libkern/OSAtomic.h],
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
Modified: branches/1.4/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/autoconfig.h.in?rev=45027&r1=45026&r2=45027&view=diff
==============================================================================
--- branches/1.4/include/asterisk/autoconfig.h.in (original)
+++ branches/1.4/include/asterisk/autoconfig.h.in Fri Oct 13 10:41:14 2006
@@ -147,6 +147,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+
+/* Define to 1 if your system has PMTU discovery on UDP sockets. */
+#undef HAVE_IP_MTU_DISCOVER
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
Modified: branches/1.4/main/utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/utils.c?rev=45027&r1=45026&r2=45027&view=diff
==============================================================================
--- branches/1.4/main/utils.c (original)
+++ branches/1.4/main/utils.c Fri Oct 13 10:41:14 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