This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: recvfrom + MSG_PEEK = broken?
On 3/22/2010 7:03 AM, Corinna Vinschen wrote:
> On Mar 22 02:04, Charles Wilson wrote:
>> I've been tracking down a problem in xinetd. It appears to be an issue
>> with using MSG_PEEK in recvfrom() on UDP sockets.
>
> Yes, that's a bug in Cygwin. The socket event handling got messed up
> when MSG_PEEK was used. I fixed that in CVS so it will be in 1.7.2.
Confirmed: fixes both my testcase, and the error in xinetd. Thanks for
the quick turnaround! I was about ready to pull my hair out on this
problem, because I just couldn't see what xinetd was doing wrong, and
debugging networking daemons is...not fun.
This also is a partial explanation for some of the oddities we were
seing with libwrap, and IPv6/IPv4/IPv4-in-IPv6 connections. Not all of
them, so there's still some (application level) work to do, but I'm
getting there.
> The last time I had problems with MSG_PEEK was back in 2006. Curious
> how seldomly it's used, apparently.
Well, it didn't appear to cause a problem in xinetd wrt TCP connections,
only UDP. And who -- except me -- tries to test the builtin servers
like 'daytime' and 'echo', over UDP? If you're smart, you don't even
enable those services...
> Thanks for the simple testcase! It was very helpful to track down
> the problem easily.
Glad to hear it.
--
Chuck
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple