This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] resolv_test.c: also cope with CONNREFUSED errors returned by recvfrom
- From: Florian Weimer <fweimer at redhat dot com>
- To: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 25 Sep 2017 09:31:02 +0200
- Subject: Re: [PATCH] resolv_test.c: also cope with CONNREFUSED errors returned by recvfrom
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1A03B4A6EF
- References: <20170910143816.v5tdzfyywtbi7aae@var.youpi.perso.aquilenet.fr>
On 09/10/2017 04:38 PM, Samuel Thibault wrote:
+ if (length < 0)
+ {
+ /* The other end had closed the socket, and we are notified only now. */
+ TEST_VERIFY_EXIT (errno == ECONNREFUSED);
+ return true;
+ }
Sorry for not replying sooner.
This UDP socket is unconnected. If asynchronous error notifications are
received on it, this is arguably a TCP/IP stack bug.
Thanks,
Florian