Description

Larger SIP frames get dropped when sent over UDP and IPv6. The sending side has MTU 1500 and the receiving side has MTU 1492. This is an IPv6-only setup, so this is problematic. Also, pulling down the MTU of a general server for a tunneled peer would smear like an oil stain. The suggestion to fallback on TCP feels like a hack.

Troubleshooting

Reproduction

Send a SIP message to a network interface with a lower MTU than the submitted frame size.

Debugging Data

None, transmission works fine.

Log Messages

None, transmission works fine.

SIP Traffic

Irrelevant.

Code Investigation

I explored the Kamailio source code for MTU handling.

https://github.com/kamailio/kamailio/blob/81265e41b52cfda9a284233c93683522a98f0a64/src/core/udp_server.c#L340-L349

https://github.com/kamailio/kamailio/blob/81265e41b52cfda9a284233c93683522a98f0a64/src/core/udp_server.c#L331-L339

Possible Solutions

I have been thinking about ways to lower MTU values only for some peers.

  1. Using connected sockets might work, possibly as an alternative when Path MTU problems arise. It might not scale however.

  2. Every socket could have an extra sending socket set to a lower MTU. The use of SO_REUSEADDR seems to allow for that.

  3. Before falling back on an extra socket, the desired MTU could be set. Alternatively, as for IPv6, an MTU of 1280 might be considered in many cases:

Additional Information

Kamailio 5.2.1 from Debian stable
Linux Debian stable on kernel 4.19.0

(I don't suppose it matters, this code has been around for ages. I used permalinks for stable reference).


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3119@github.com>