diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-12 18:31:26 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-12 18:31:26 +0000 |
commit | b8e500649197199ddefffb2b93dc875a7f1934df (patch) | |
tree | 46586ceeff7c93a40e6160e95a9064297cee7408 /include/asterisk | |
parent | 54b6e50502ff33fd6c68d2ae03b2af0f5eedaa9e (diff) |
ensure that IAX2 and SIP sockets allow UDP fragmentation when running on Linux (thanks to Brian Candler on the asterisk-dev list for the tip)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@44955 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/utils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index b6b85df4e..0f1df4003 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -235,4 +235,19 @@ char *ast_process_quotes_and_slashes(char *start, char find, char replace_with); int getloadavg(double *list, int nelem); #endif +/*! + \brief Disable PMTU discovery on a socket + \param sock The socket to manipulate + \return Nothing + + On Linux, UDP sockets default to sending packets with the Dont Fragment (DF) + bit set. This is supposedly done to allow the application to do PMTU + discovery, but Asterisk does not do this. + + Because of this, UDP packets sent by Asterisk that are larger than the MTU + of any hop in the path will be lost. This function can be called on a socket + to ensure that the DF bit will not be set. + */ +void ast_enable_packet_fragmentation(int sock); + #endif /* _ASTERISK_UTILS_H */ |