Red Hat Bugzilla – Bug 1375
UDP recvfrom() calls return ECONNREFUSED after sendto() calls
Last modified: 2008-05-01 11:37:49 EDT
After calling sentto() on an unconnected UDP socket
the next recvfrom() call made will return an error
with errno set to ECONNREFUSED.
This sort of an error from an unconnected UDP socket
makes no sense and it is not documented in the man pages.
I have a fairly simple C test program that demonstrates
this problem that I can make available upon request. This
test program works fine on other unix platforms including
BSDI, SCO OpenServer, SCO UnixWare and DGUX.
I am seeing lots of confusion in the news groups about this
It's not a bug, it's a feature; it's returning the error
from the previous UDP call. See RFC1122, sect. 22.214.171.124.
If you want the BSD socket behavior, you need to set the
SO_BSDCOMPAT socket option.
------- Email Received From "Thomas J. Feller" <firstname.lastname@example.org> 03/08/99 17:39 -------
If is is a feature than it should be clearly documented in the man
pages. Are you saying that I need to figure out how the function
calls work by inferring their behavior from RFCs? If so which RFCs
apply to Red Hat Linux 5.2?