mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.2@44955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -12856,10 +12856,13 @@ static int reload_config(void)
|
||||
} else {
|
||||
/* Allow SIP clients on the same host to access us: */
|
||||
const int reuseFlag = 1;
|
||||
|
||||
setsockopt(sipsock, SOL_SOCKET, SO_REUSEADDR,
|
||||
(const char*)&reuseFlag,
|
||||
sizeof reuseFlag);
|
||||
|
||||
ast_enable_packet_fragmentation(sipsock);
|
||||
|
||||
if (bind(sipsock, (struct sockaddr *)&bindaddr, sizeof(bindaddr)) < 0) {
|
||||
ast_log(LOG_WARNING, "Failed to bind to %s:%d: %s\n",
|
||||
ast_inet_ntoa(iabuf, sizeof(iabuf), bindaddr.sin_addr), ntohs(bindaddr.sin_port),
|
||||
|
Reference in New Issue
Block a user