use a configure script test for PMTU discovery control instead of just assuming it's available on Linux

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@45027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-10-13 15:41:14 +00:00
parent 3a602aa1d7
commit 1944a9a07c
4 changed files with 85 additions and 3 deletions

View File

@@ -987,10 +987,10 @@ int ast_dynamic_str_thread_build_va(struct ast_dynamic_str **buf, size_t max_len
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 */
}