[PATCH] resolv_test.c: also cope with CONNREFUSED errors returned by recvfrom

Samuel Thibault samuel.thibault@ens-lyon.org
Mon Sep 25 07:38:00 GMT 2017


Florian Weimer, on lun. 25 sept. 2017 09:31:02 +0200, wrote:
> 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.

Reception of "port unreachable" icmp packets can be asynchronous with
UDP too.

Samuel



More information about the Libc-alpha mailing list