[Asterisk-Dev] RTP not sending UDP checksums?

Andrew Lindh asterisk at ntplx.net
Mon Feb 28 14:40:33 MST 2005


It's not an old kernel, or the card, or tcpdump....it's the way the
socket option is used on linux. I checked the linux kernel source.

When SO_NO_CHECK is set it uses:
	0=normal default, generate UDP checksum.
	1=do not send checksums, set it to 0

This is a send only option. It does not change the way asterisk recives
UDP packets. The asterisk default is to NOT send UDP checksums with RTP....

I guess I should have looked into it a little more....so I'll say it's
not a bug, it's a choice. With no checksum there is a chance of 2 bytes
less in a compressed packet (cRTP) and the kernel (or hardware) does not
have to compute the checksum. So this whole thing is a non-issue.

FYI: Code from the Linux kernel.....if no check sum than it skips it and
just sends the packet.
        if (sk->sk_no_check == UDP_CSUM_NOXMIT) {
                skb->ip_summed = CHECKSUM_NONE;
                goto send;
        }


>
>Michael Loftis wrote:
>
>> This is a possibility, there are a decent number of hardware supported 
>> offload engines built into ethernet cards nowadays....though I don't 
>> know how many support UDP...but if yours does then you could end up 
>> without UDP checksums until it actually goes out on the wire.
>
>Very true... nearly every decent Ethernet card nowadays does IP 
>checksums on its own, many of them probably do UDP checksums as well.

  Andrew
  




More information about the asterisk-dev mailing list