From owner-freebsd-current Mon Nov 4 17:22:25 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 A3F8A37B401; Mon, 4 Nov 2002 17:22:23 -0800 (PST) Received: from pimout4-ext.prodigy.net (pimout4-ext.prodigy.net [207.115.63.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 989DC43E3B; Mon, 4 Nov 2002 17:22:17 -0800 (PST) (envelope-from kbyanc@posi.net) Received: from gateway.posi.net (adsl-63-201-92-224.dsl.snfc21.pacbell.net [63.201.92.224]) by pimout4-ext.prodigy.net (8.12.3 da nor stuldap/8.12.3) with ESMTP id gA51MFQ0088640; Mon, 4 Nov 2002 20:22:15 -0500 Received: from localhost (localhost [127.0.0.1]) by gateway.posi.net (8.12.6/8.12.5) with ESMTP id gA51MDOQ050734; Mon, 4 Nov 2002 17:22:14 -0800 (PST) (envelope-from kbyanc@posi.net) Date: Mon, 4 Nov 2002 17:22:13 -0800 (PST) From: Kelly Yancey To: Terry Lambert Cc: Hidetoshi Shimokawa , Doug Barton , , Subject: Re: Can't resolve hosts via dns on the command line with latest-current In-Reply-To: <3DC70B18.2217E01F@mindspring.com> Message-ID: <20021104171257.G50723-100000@gateway.posi.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Mon, 4 Nov 2002, Terry Lambert wrote: > 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 > No, it turns out I'm an idiot: somehow the address on loopback got deleted so it was trying to use my default route. So I was on a wild goose chase. :| Oddly enough, though, once I re-added 127.0.0.1/8 to my localhost: # cat resolv.conf search nttmcl.com nameserver 127.0.0.1 # ps auwwwx | grep named root 320 0.0 0.8 2600 2160 ?? Is 5:11PM 0:00.03 named # ping www.freebsd.org PING www.freebsd.org (216.136.204.117): 56 data bytes 64 bytes from 216.136.204.117: icmp_seq=0 ttl=50 time=16.343 ms 64 bytes from 216.136.204.117: icmp_seq=1 ttl=50 time=8.764 ms ^C --- www.freebsd.org ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 8.764/12.553/16.343/3.789 ms # ping www.yahoo.com Go figure. I've said it before and I'll say it again...I'm working on it. :| Kelly -- Kelly Yancey -- kbyanc@{posi.net,FreeBSD.org} "Though [the people] may acquiesce, they cannot approve what they do not understand." --Thomas Jefferson, 1792. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message