From owner-freebsd-current Mon Nov 4 16: 6:11 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BC4C37B401; Mon, 4 Nov 2002 16:06:10 -0800 (PST) Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFAB043E3B; Mon, 4 Nov 2002 16:06:06 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0210.cvx22-bradley.dialup.earthlink.net ([209.179.198.210] helo=mindspring.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 188rEE-0003Ct-00; Mon, 04 Nov 2002 16:05:59 -0800 Message-ID: <3DC70B18.2217E01F@mindspring.com> Date: Mon, 04 Nov 2002 16:04:40 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Kelly Yancey Cc: Hidetoshi Shimokawa , Doug Barton , freebsd-current@FreeBSD.org, kbyanc@FreeBSD.org Subject: Re: Can't resolve hosts via dns on the command line with latest-current References: <20021104153745.X50554-100000@gateway.posi.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kelly Yancey wrote: > 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. Pretty clear, I should think: IF the source address is a loopback address OR the destination address is a loopback address THEN IF the interface does not have the IFF_LOOBACK flag return EADDRNOTAVAIL ...pretty clearly, the new loopback interface doe not set the flag IFF_LOOPBACK on the interface, as it is supposed to do. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message