From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Apr 28 12:10:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D51B210656AF for ; Mon, 28 Apr 2008 12:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B9E858FC2F for ; Mon, 28 Apr 2008 12:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3SCA2uG065355 for ; Mon, 28 Apr 2008 12:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3SCA2ft065354; Mon, 28 Apr 2008 12:10:02 GMT (envelope-from gnats) Resent-Date: Mon, 28 Apr 2008 12:10:02 GMT Resent-Message-Id: <200804281210.m3SCA2ft065354@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ashish Shukla Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D301D106566C for ; Mon, 28 Apr 2008 12:09:23 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C9AF38FC15 for ; Mon, 28 Apr 2008 12:09:23 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m3SC8mWw098385 for ; Mon, 28 Apr 2008 12:08:48 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m3SC8mwK098384; Mon, 28 Apr 2008 12:08:48 GMT (envelope-from nobody) Message-Id: <200804281208.m3SC8mwK098384@www.freebsd.org> Date: Mon, 28 Apr 2008 12:08:48 GMT From: Ashish Shukla To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/123169: dns/nss_mdns: not returning IPv6 address on getaddrinfo() function call X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2008 12:10:02 -0000 >Number: 123169 >Category: ports >Synopsis: dns/nss_mdns: not returning IPv6 address on getaddrinfo() function call >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Apr 28 12:10:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Ashish Shukla >Release: 7.0-RELEASE-p1 >Organization: N/A >Environment: FreeBSD monte-cristo.fr 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #1: Sun Apr 27 23:45:30 IST 2008 root@monte-cristo.fr:/usr/obj/usr/src/sys/ULE amd64 >Description: Whenever I execute getaddrinfo() function from libc with a 'hostname.local' address as an argument and AF_INET6 as ai.ai_family, I always get an IPv4 address, even when 'avahi-resolve-host-name -6 hostname.local' returns an IPv6 address. >How-To-Repeat: I've written a test program getaddrinfo.c[1] which does a getaddrinfo() function call and prints the result on the terminal. [1] - http://pastebin.com/pastebin.php?dl=f20d45049 >Fix: Refer to the attached patch.txt, which is a patch for dns/nss_mdns port, and will fix the issue. Patch attached with submission follows: diff -urN /usr/ports/dns/nss_mdns/Makefile nss_mdns/Makefile --- /usr/ports/dns/nss_mdns/Makefile 2008-01-03 17:53:37.000000000 +0530 +++ nss_mdns/Makefile 2008-04-27 01:22:10.000000000 +0530 @@ -7,7 +7,7 @@ PORTNAME= nss_mdns PORTVERSION= 0.9 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= dns ipv6 MASTER_SITES= http://0pointer.de/lennart/projects/nss-mdns/ DISTNAME= nss-mdns-${PORTVERSION} diff -urN /usr/ports/dns/nss_mdns/files/patch-src__bsdnss.c nss_mdns/files/patch-src__bsdnss.c --- /usr/ports/dns/nss_mdns/files/patch-src__bsdnss.c 2007-04-12 16:13:15.000000000 +0530 +++ nss_mdns/files/patch-src__bsdnss.c 2008-04-27 01:19:18.000000000 +0530 @@ -197,7 +197,7 @@ + * 2. Map hostent to addrinfo. + * 3. Hand-off buffer to libc. + */ -+ status = _nss_mdns_gethostbyname_r(name, hp, buffer, mbuflen, ++ status = _nss_mdns_gethostbyname2_r(name, pai->ai_family, hp, buffer, mbuflen, + &_errno, &_h_errno); + status = __nss_compat_result(status, _errno); + >Release-Note: >Audit-Trail: >Unformatted: