[Asterisk-bsd] NetBSD: Bad UDP checksum?
Dr. Rich Murphey
Rich at WhiteOakLabs.com
Fri Nov 5 15:43:08 CST 2004
Linux uses EAGAIN to indicate UDP checksum errors.
One of the meanings of EAGAIN on *BSD is... reading a socket returns
EAGAIN to indicate that the system call was interrupted. That/s the
clearest case where it could be immediately invoked again and possibly
return some data.
But is more likely that the socket is set for non-blocking IO and the
read call is returnin EAGAIN to indicate that no data was available.
In most of the cases, where the read is in a loop, a solution is to
#ifdef out the error message on *BSD.
#if ! defined(BSD)
/* On *BSD EAGAIN indicates an interrupted system call that can be retried */
ast_log(LOG_NOTICE, "RTP: Received packet with bad
UDP checksum\n");
#endif
I believe that the error message is the only issue here, so as far as I
can see that should be sufficient. The remaining code that looks at
EAGAIN has already been ported and is doing the right thing as far as I
can see.
Point me to the specific patch or file if you need more info!
Cheers,
Rich
Jay Adelson wrote:
>I've been able to repeat this problem easily...
>
>Rich, are you familiar enough with the patch you could translate it into
>English for me?
>
>Thanks.
>
>-j
>
>On Wed, Nov 03, 2004 at 09:25:16AM +0000, Chris Stenton wrote:
>
>
>>On Tue, 2004-11-02 at 21:00, Alexander Timoshenko wrote:
>>
>>
>>>Jay Adelson (jay at adelson.org) wrote:
>>>
>>>
>>>>I've noticed that when I check voicemail, for example, I will get
>>>>a quickly repeating error on the CLI:
>>>>
>>>>Nov 2 12:50:08 NOTICE[2573]: rtp.c:439 ast_rtp_read: RTP: Received packet with bad UDP checksum
>>>>
>>>>This repeats hundreds of times until the message from the voicemail
>>>>terminates.
>>>>
>>>>Anyone seen this?
>>>>
>>>>
>>> It is wrong handling of EAGAIN return code. Check asterisk-dev archives
>>>for today to get more info.
>>>
>>>
>>I thought Rich put a patch in for this back in July. I am not seeing any
>>problem under FreeBSD but I have not updated for a few days.
>>
>>Chris
>>
>>
>>_______________________________________________
>>Asterisk-BSD mailing list
>>Asterisk-BSD at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-bsd
>>
>>
>_______________________________________________
>Asterisk-BSD mailing list
>Asterisk-BSD at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
>
>
>
>
More information about the Asterisk-BSD
mailing list