From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32358 invoked by alias); 29 Aug 2017 10:37:42 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 32343 invoked by uid 89); 29 Aug 2017 10:37:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=ifa, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AB8E65F73A Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer@redhat.com Subject: Re: [PATCH] [BZ #21812] getifaddrs() Don't return ifa entries with NULL names To: Daniel Alvarez , libc-alpha@sourceware.org References: <20170724205618.21515-1-dalvarez@redhat.com> From: Florian Weimer Message-ID: Date: Tue, 29 Aug 2017 10:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170724205618.21515-1-dalvarez@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2017-08/txt/msg01224.txt.bz2 On 07/24/2017 10:56 PM, Daniel Alvarez wrote: > Due to bug 21812, a lookup operation in map_newlink() turns out > into an insert because of holes in the interface part of the map. > This leads to incorrectly set the name of the interface to NULL when > the interface is not present for the address being processed (most > likely because the interface was added between the RTM_GETLINK and > RTM_GETADDR calls to the kernel). > > This patch checks this condition and retries the whole operation. > Hopes are that next time the interface corresponding to the address > entry is present in the list and correct name is returned. > > Signed-off-by: Daniel Alvarez The downstream bug has a different patch: I think using NLM_F_DUMP_INTR to check the inconsistency is preferable (if it actually works). glibc requires kernel 3.2 these days, so we can assume that kernel support is present. Thanks, Florian