public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Daniel Alvarez <dalvarez@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] [BZ #21812] getifaddrs() Don't return ifa entries with NULL names
Date: Tue, 29 Aug 2017 10:37:00 -0000	[thread overview]
Message-ID: <bb4606e0-d145-edde-3e04-55312553158a@redhat.com> (raw)
In-Reply-To: <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

  reply	other threads:[~2017-08-29 10:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 20:58 Daniel Alvarez
2017-08-29 10:37 ` Florian Weimer [this message]
2018-06-15 13:29 Daniel Alvarez
2018-06-15 19:12 ` Adhemerval Zanella
2018-06-29  6:58   ` Daniel Alvarez Sanchez
2018-06-29  9:38     ` Florian Weimer
2018-06-29  8:22 ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bb4606e0-d145-edde-3e04-55312553158a@redhat.com \
    --to=fweimer@redhat.com \
    --cc=dalvarez@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).