From: Florian Weimer <fweimer@redhat.com>
To: Daniel Alvarez Sanchez <dalvarez@redhat.com>,
adhemerval.zanella@linaro.org
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] [BZ #21812] getifaddrs() Don't return ifa entries with NULL names
Date: Fri, 29 Jun 2018 09:38:00 -0000 [thread overview]
Message-ID: <6e5c6e08-5404-f20b-26bd-2aa5b68b5d16@redhat.com> (raw)
In-Reply-To: <CAPXMuf-mJk9QXxn9+cbwpqyUcTo3EMjQCXW9WqDjdJo8ucs+EA@mail.gmail.com>
On 06/29/2018 08:57 AM, Daniel Alvarez Sanchez wrote:
> Thanks a lot for reviewing. It'd be nice to get this in soon as it can
> happen easily on systems with lots of interfaces.
>
> Here it's a reproducer:
>
> $ sudo unshare -n
> # cat create-links.sh
> #!/bin/bash
> for i in {1..512}; do ifname="dum$i"; ip li add $ifname type dummy; ip
> li set $ifname up; done
> # ./create-links.sh
> # cat loop-add-del-link.sh
> #!/bin/bash
> while :; do ifname="test$RANDOM"; ip li add $ifname type dummy; ip li
> set $ifname up; sleep 0.1; ip li del $ifname; done
> # ./loop-add-del-link.sh &
> [1] 6260
> # ./loop-add-del-link.sh &
> [2] 6314
> # ./loop-add-del-link.sh &
> [3] 6374
> # ./loop-add-del-link.sh &
> [4] 6476
> # ./loop-add-del-link.sh &
> [5] 6628
> # cat dalvarez-tester.c
> #include <sys/types.h>
> #include <ifaddrs.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
Can you come up with a test that uses the loopback interface and
loopback aliases devices only (lo:NNN)? Or is this not possible?
I don't want to implement all the Netlink stuff for creating a dummy
interface, and the kernel module might not be available.
Thanks,
Florian
next prev parent reply other threads:[~2018-06-29 9:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-06-29 8:22 ` Florian Weimer
-- strict thread matches above, loose matches on Subject: below --
2017-07-24 20:58 Daniel Alvarez
2017-08-29 10:37 ` 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=6e5c6e08-5404-f20b-26bd-2aa5b68b5d16@redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--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).