Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Nov 2002 15:45:06 -0800 (PST)
From:      Kelly Yancey <kbyanc@posi.net>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>, Doug Barton <DougB@FreeBSD.org>, <freebsd-current@FreeBSD.org>, <kbyanc@FreeBSD.org>
Subject:   Re: Can't resolve hosts via dns on the command line with latest-current
Message-ID:  <20021104153745.X50554-100000@gateway.posi.net>
In-Reply-To: <3DC6DE7C.40A78C43@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Nov 2002, Terry Lambert wrote:

> Kelly Yancey wrote:
> >   I suspect something in lib/libc/net/res_send.c is using special knowledge of
> > the contents of the socket buffer so calculate the real amount of data that
> > can be read (which this patch does automatically).  I'm looking into it.
>
> ...To ensure that the read does not block, and is not issued
> until sufficient data exists.
>
> -- Terry
>

  It doesn't matter.  It isn't just DNS lookups, mountd fails to run too
because it cannot connect to portmap via localhost.  Oddly, in both cases
sendto() is returning with errno = 49 (EADDRNOTAVAIL).  I've tracked it down
to this code in sys/netinet/ip_output.c:

  /* 127/8 must not appear on wire - RFC1122. */
  if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET ||
      (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) {
          if ((ifp->if_flags & IFF_LOOPBACK) == 0) {
                  ipstat.ips_badaddr++;
                  error = EADDRNOTAVAIL;
                  goto bad;
          }
  }

  Which was last modified in revision 1.150 back in February.  However, I
still don't see how adding an extra counter to the sockbuf could possibly
change the set of events required to get to this code, but it is certainly
what is causing EADDRNOTAVAIL to be returned.  Needless to say, I'm still
researching it.

  Kelly

--
Kelly Yancey -- kbyanc@{posi.net,FreeBSD.org}
FreeBSD, The Power To Serve: http://www.freebsd.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021104153745.X50554-100000>