Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2001 12:35:28 -0800 (PST)
From:      duco@jaspars.net
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/25749: gethostbyaddr only seems to look at /etc/hosts and not bind as of kernel FreeBSD 4.3-BETA #6
Message-ID:  <200103122035.f2CKZSv95732@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




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