delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/22/09:57:05

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4BA78525.5080206@cwilson.fastmail.fm>
Date: Mon, 22 Mar 2010 10:56:37 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: Cygwin Mailing List <cygwin AT cygwin DOT com>
Subject: Re: recvfrom + MSG_PEEK = broken?
References: <4BA7085D DOT 3050307 AT cwilson DOT fastmail DOT fm> <20100322110352 DOT GA32321 AT calimero DOT vinschen DOT de>
In-Reply-To: <20100322110352.GA32321@calimero.vinschen.de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019