From owner-freebsd-bugs Mon Mar 12 12:40:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 81B1337B719 for ; Mon, 12 Mar 2001 12:40:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2CKe1K96247; Mon, 12 Mar 2001 12:40:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7C58937B718 for ; Mon, 12 Mar 2001 12:35:28 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2CKZSv95732; Mon, 12 Mar 2001 12:35:28 -0800 (PST) (envelope-from nobody) Message-Id: <200103122035.f2CKZSv95732@freefall.freebsd.org> Date: Mon, 12 Mar 2001 12:35:28 -0800 (PST) From: duco@jaspars.net To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/25749: gethostbyaddr only seems to look at /etc/hosts and not bind as of kernel FreeBSD 4.3-BETA #6 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 25749 >Category: kern >Synopsis: gethostbyaddr only seems to look at /etc/hosts and not bind as of kernel FreeBSD 4.3-BETA #6 >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 12 12:40:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Duco Jaspars >Release: 4.2 STABLE >Organization: private >Environment: FreeBSD dino 4.3-BETA FreeBSD 4.3-BETA #6: Sun Mar 11 20:04:44 CET >Description: Yesterday I did a cvsup for 4.2 STABLE and build a new kernel. After a reboot of my system which always worked fine up to yesterday, to load the new kernel, I noticed 2 problems. First problem was that sendmail kept complaining about two virtual interfaces in my box: Mar 12 00:35:20 dino sendmail[43139]: gethostbyaddr(212.153.153.10) failed: 2 Mar 12 00:36:40 dino sendmail[43139]: gethostbyaddr(212.153.153.11) failed: 2 Mar 12 00:37:20 dino sendmail[43427]: gethostbyaddr(212.153.153.10) failed: 2 Mar 12 00:38:40 dino sendmail[43427]: gethostbyaddr(212.153.153.11) failed: 2 Mar 12 00:39:21 dino sendmail[43998]: gethostbyaddr(212.153.153.10) failed: 2 Mar 12 00:40:41 dino sendmail[43998]: gethostbyaddr(212.153.153.11) failed: 2 every time sendmail was invoked, it took ages to send or receive mail since it seemd to be waiting for an answer from gethostbyaddr for the two aditional interface ip numbers. Both IP numbers have forward and reversed mapping in DNS, but where not in /etc/hosts, but tools like host on the box produced answers The second problem was when I tried to start and X session from an other system on this box trough XDMCP, which used to work, nothing happened. When I added all local IP numbers for this box to /etc/hosts, both problems dissapeared. To me it seems like there is something broken in the gethostbyaddr syscall so it only looks at the hostsfile and does not fall back to BIND if the hosts are not in /etc/hosts. First I thought this was a security enhancement, but I could not find any notification about it in the documentation or on the FreeBSD website, so now I think it is a bug Tools like host, dig and nslookup answered on a reversed lookup for both IP numbers, but sendmail and probably xdm or syslog refused to querry bind. my /etc/host.conf file contains: # $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $ # First try the /etc/hosts file hosts # Now try the nameserver next. bind /etc/resolv.conf contains: nameserver 127.0.0.1 nameserver 212.153.153.1 >How-To-Repeat: remove the entries from /etc/hosts >Fix: add the entries to /etc/hosts >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message