This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [BZ #21812] getifaddrs() Don't return ifa entries with NULL names
- From: Florian Weimer <fweimer at redhat dot com>
- To: Daniel Alvarez <dalvarez at redhat dot com>, libc-alpha at sourceware dot org
- Date: Tue, 29 Aug 2017 12:37:28 +0200
- Subject: Re: [PATCH] [BZ #21812] getifaddrs() Don't return ifa entries with NULL names
- Authentication-results: sourceware.org; auth=none
- 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 at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AB8E65F73A
- References: <20170724205618.21515-1-dalvarez@redhat.com>
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 <dalvarez@redhat.com>
The downstream bug has a different patch:
<https://bugzilla.redhat.com/show_bug.cgi?id=1472832>
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