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
- Cc: Jakub Sitnicki <jkbs at redhat dot com>
- Date: Fri, 29 Jun 2018 10:16:40 +0200
- Subject: Re: [PATCH] [BZ #21812] getifaddrs() Don't return ifa entries with NULL names
- References: <20180615132915.83940-1-dalvarez@redhat.com>
On 06/15/2018 03:29 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). When such changes are detected
by the kernel, it'll mark the dump as "inconsistent" by setting
NLM_F_DUMP_INTR flag on the next netlink message.
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.
I fixed a few cosmetic issues, added a ChangeLog entry, and committed
this. Thanks.
I'm working on a self-contained test case, too.
Thanks,
Florian