]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Set TCP_NODELAY on TCP transports 39/2839/1
authorGeorge Joseph <gjoseph@digium.com>
Mon, 16 May 2016 00:05:34 +0000 (18:05 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 16 May 2016 00:05:34 +0000 (18:05 -0600)
commitb6f9392a122a905ebf1925c8b00ababa8ad04125
tree39bbbec3a9098a131eda502a30da60731010aabc
parent12db14b9b1f690c7a599d0dea36c5ec64a8f5422
res_pjsip:  Set TCP_NODELAY on TCP transports

Although it's perfectly legal to place multiple SIP messages in the same packet,
it can cause problems because the Linux default is to enable Path MTU Discovery
which sets the Don't Fragment bit on the packets. If adding a second message to
the packet causes the MTU to be exceeded, and the destination isn't equipped to
send a FRAGMENTATION NEEDED response to a large packet, the packet will just be
dropped.

We can't specifically tell the stack to send only 1 message per packet, but we
can turn on TCP_NODELAY when we create the transport. This will at least tell
the stack to send packets as soon as possible.

ASTERISK-26005 #close
Reported-by: Ross Beer
Change-Id: I820f23227183f2416ca5e393bec510e8fe1c8fbd
res/res_pjsip/config_transport.c