This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/21812] getifaddrs() returns entries with ifa_name == NULL
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 29 Jun 2018 17:24:31 +0000
- Subject: [Bug network/21812] getifaddrs() returns entries with ifa_name == NULL
- Auto-submitted: auto-generated
- References: <bug-21812-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21812
--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, release/2.26/master has been updated
via 3aaf8bda00988f21f4a83affff47bafc74a745a0 (commit)
from f958b45d528390fb486cecd0b0615a1994e96795 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3aaf8bda00988f21f4a83affff47bafc74a745a0
commit 3aaf8bda00988f21f4a83affff47bafc74a745a0
Author: Daniel Alvarez <dalvarez@redhat.com>
Date: Fri Jun 29 17:23:13 2018 +0200
getifaddrs: Don't return ifa entries with NULL names [BZ #21812]
A lookup operation in map_newlink could turn 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.
(cherry picked from commit c1f86a33ca32e26a9d6e29fc961e5ecb5e2e5eb4)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
NEWS | 1 +
sysdeps/unix/sysv/linux/ifaddrs.c | 8 ++++++++
3 files changed, 16 insertions(+), 0 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.