[Asterisk-Dev] EAGAIN - recvfrom - bad udp checksum

Olle E. Johansson oej at edvina.net
Wed Nov 3 01:37:17 MST 2004


Peter Svensson wrote:

> On Wed, 3 Nov 2004, Olle E. Johansson wrote:
> 
> 
>>Well, but not from a FreeBSD angle. So it seems that this error message,
>>based on this and earlier discussions, only applies to Linux. Thank
>>you all for the responses.
> 
> 
> It could also indicate an interrupted syscall in Linux. All it is really 
> claiming (on any architecture) is that no data was read. Linux checks the 
> checksum at a late stage, thus making the packet disappear during the 
> read and returning EAGAIN. Other operating systems checks it earlier and 
> discards the packet without any effects noticable to userland.
> 
> In Linux EAGAIN from an udp read in a program without signals or where the
> read syscall on udp is restartable then EAGAIN may be taken as an
> indication of an udp packet with a broken checksum.
> 
> Does that sum it up properly?
> 
Yes, but do you also have insights on FreeBSD and other BSD's - is EAGAIN
really a signal of a bad UDP checksum there as well or is it another issue?

/O



More information about the asterisk-dev mailing list