Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange error resolving non-existent hostname



Joerg Sonnenberger wrote:
> >    $ telnet nosuch
> >    nosuch: No address associated with hostname
> > 
> > I get the above (incorrect) output on both 6.1.4 and -current.
> > 
> > > Any ideas what could be the reason for this?
> > 
> > Looks like a bug in NetBSD's getaddrinfo() to me.
> 
> Linux provides exactly the same output.

My Linux system doesn't:

  $ uname -a; telnet nosuch
  Linux gurli 2.6.35-32-generic #67-Ubuntu SMP Mon Mar 5 19:35:26 UTC 2012 i686 GNU/Linux
  telnet: could not resolve nosuch/telnet: Name or service not known

Nor does Mac OS X:

  $ uname -a; telnet nosuch
  Darwin guinea.araneus.fi 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
  nosuch: nodename nor servname provided, or not known

The point being that the correct message is whatever corresponds to
a getaddrinfo() return value of EAI_NONAME, not EAI_NODATA.

See also PR 44915.
-- 
Andreas Gustafsson, gson%gson.org@localhost


Home | Main Index | Thread Index | Old Index