On Aug 18, 2022, at 7:15 AM, Greg Troxel
<gdt(a)lexort.com> wrote:
Alex Balashov <abalashov(a)evaristesys.com> writes:
Hi Ali,
Kamailio reassembles fragmented UDP just fine.
Do you really mean that, or "operating systems reassemble fragmented UDP
packets and hand the full packet to Kamailio"?
No, it was shorthand for the latter. The intent was to emphasise that there’s nothing
about Kamailio which is inherently confounded by fragmentation.
This should not prevent the INVITE from being
parsed; typically in
real-world scenarios with a 1500 byte MTU, the first fragment captures
all SIP headers, and fragmentation slices up the SDP
payload. Fragmentation won’t adulterate the Request Line (first line),
which contains the “INVITE” method verb. I suppose it is conceivable
that a fragmentation boundary could occur in the middle of a SIP
header and/or header value, causing the entire message to be
discarded.
I would expect that if there is say a 1500-byte fragment and a 700-byte
fragment (to make things up) and a firewall drops the 700-byte one, then
reassembly at the OS would fail and Kamailio would never see anything.
In principle, that’s right. Practically, this depends on the behaviour of various
intermediaries. I have seen both behaviours. In the scenarios I have troubleshot,
receiving only the first fragment on the other side of—for example—a NAT gateway is fairly
common.
Or does Kamailio do some sort of raw socket listening
and actually do
fragment reassembly in user space? That would be very surprising to me.
No, it doesn’t. Sloppy phraseology on my part.
— Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web:
http://www.evaristesys.com/,
http://www.csrpswitch.com/