nscd and IPv6

Philip Blundell Philip.Blundell@pobox.com
Tue Jan 11 12:02:00 GMT 2000


I think this code in nscd/hstcache.c is bogus:

      /* And the generated IPv6 addresses if necessary.  */
      if (hst->h_length == INADDRSZ)
	{
	  /* Generate the IPv6 addresses.  */
	  for (cnt = 0; cnt < h_addr_list_cnt; cp += IN6ADDRSZ, ++cnt)
	    map_v4v6_address (hst->h_addr_list[cnt], cp);
	}

IMHO, the NSS code should not be automatically mapping IPv4 addresses to IPv6,
and it should certainly not be happening in nscd.  If a program wants both 
IPv4 and IPv6 addresses it should pass PF_UNSPEC to getaddrinfo().

The current nscd behaviour is confusing to users (judging by the current 
thread on libc-alpha and recent discussion elsewhere) and unhelpful on 
IPv6-only hosts where a v4-mapped address is no use.

Does anybody object to deleting this code?

Thanks

p.




More information about the Libc-hacker mailing list