Subject: bin/10713: NIS makefile does not allow "multiple IP address on hosts" mapping
To: None <>
From: None <>
List: netbsd-bugs
Date: 07/29/2000 19:24:34
>Number:         10713
>Category:       bin
>Synopsis:       NIS makefile does not allow "multiple IP address on hosts" mapping
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 29 19:25:01 PDT 2000
>Originator:     Jun-ichiro itojun Hagino
>Release:        20000728
System: NetBSD 1.5C NetBSD 1.5C (STARFRUIT) #79: Fri Jul 28 17:41:41 JST 2000 i386

	NIS database maintenance code does not support /etc/hosts with
	mutiple address for a single host.  this is rather important for
	IPv4/v6 dual stack database, like:
--	localhost
::1		localhost
	however, it is not IPv6 problem.  this affects IPv4-only people too.

	put the following entry into /etc/hosts.
--	localhost	localhost
	generate NIS database (cd /var/yp; make).
	look into /var/yp/mydomain/hosts.byname.db.  you will see the following

key = "localhost"
value = " localhost"

	on call to yp_match() from lib/libc/net/getadrinfo.c or
	lib/libc/net/gethnamaddr.c, we will lookup the the above entry,
	and will not be able to get

	fix usr.sbin/ypserv/ypinit/Makefile.yp so that it would generate
	the following mapping into hosts.byname.
	libc functions can take care of multi-line entry.

key = "localhost"
value = " localhost\n127.0.0.2 localhost"