From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4434 invoked by alias); 21 Jun 2011 21:06:10 -0000 Received: (qmail 4414 invoked by uid 22791); 21 Jun 2011 21:06:09 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Jun 2011 21:05:56 +0000 Received: by vxg38 with SMTP id 38so180295vxg.0 for ; Tue, 21 Jun 2011 14:05:55 -0700 (PDT) Received: by 10.220.195.77 with SMTP id eb13mr2481259vcb.251.1308690354167; Tue, 21 Jun 2011 14:05:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.14.136 with HTTP; Tue, 21 Jun 2011 14:05:34 -0700 (PDT) In-Reply-To: References: From: Ulrich Drepper Date: Tue, 21 Jun 2011 21:06:00 -0000 Message-ID: Subject: Re: [PATCH] Filter results from gethostbyname4_r according to request flags To: Andreas Schwab Cc: libc-hacker@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00004.txt.bz2 On Tue, Jun 21, 2011 at 11:23, Andreas Schwab wrote: > 2011-06-21 =C2=A0Andreas Schwab =C2=A0 > > =C2=A0 =C2=A0 =C2=A0 =C2=A0[BZ #12885] > =C2=A0 =C2=A0 =C2=A0 =C2=A0* sysdeps/posix/getaddrinfo.c (gaih_inet): Fil= ter results from > =C2=A0 =C2=A0 =C2=A0 =C2=A0gethostbyname4_r according to request flags. This patch isn't correct. We need to ignore the IPv4 entries, keep track of whether we found any data. And there is no reason to copy anything. I think the patch I applied is correct. Give it a try.