From: Serhey Popovych <serhe.popovych@gmail•com>
To: David Ahern <dsahern@gmail•com>,
Eric Dumazet <eric.dumazet@gmail•com>,
Stephen Hemminger <stephen@networkplumber•org>
Cc: netdev <netdev@vger•kernel.org>, "Maciej Żenczykowski" <maze@google•com>
Subject: Re: [BUG iproute2] ip tuntap show
Date: Wed, 31 Jan 2018 19:43:18 +0200 [thread overview]
Message-ID: <6b007beb-ce91-dc2c-de3b-d8abfee7f950@gmail.com> (raw)
In-Reply-To: <bf05b217-dcf9-41f8-8fd0-7fce9703fbe0@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1121 bytes --]
David Ahern wrote:
> On 1/31/18 10:21 AM, Serhey Popovych wrote:
>> Eric Dumazet wrote:
>>> ip tuntap enumerates devices using /sys/class/net which is unusual.
>>>
>>> Should we replace this enumeration using /proc/net/dev like "ip tunnel" ?
>>>
>>> After "unshare -n" maybe mounting /sys should not be required for
>>> proper iproute2 behavior.
>>>
>>> At least ip command should adopt a common enumeration method.
>>>
>>> What do you think ?
>>
>> It seems main reason for using /sys/class/net is to get additional
>> information for netdev like "owner", "group" and "tun_flags".
>>
>> On the other hand at least iptunnel and ip6tunnel uses nearly identical
>> code to parse /proc/net/dev.
>>
>> Having single routine that reads /proc/net/dev and calls implementation
>> specific callback function with given network device name is good idea.
>>
>> I can try to prepare v1 for this, if no one objects this.
>>
>
> pid_name function needs help too. comm is allocated via sprintf, freed,
> and used again and then returned to caller.
>
Nice :-) will fix that too. Thanks for pointing.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2018-01-31 17:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 16:58 [BUG iproute2] ip tuntap show Eric Dumazet
2018-01-31 17:21 ` Serhey Popovych
2018-01-31 17:40 ` David Ahern
2018-01-31 17:43 ` Serhey Popovych [this message]
2018-01-31 19:51 ` Serhey Popovych
2018-02-05 15:34 ` Serhey Popovych
2018-02-05 16:25 ` David Ahern
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=6b007beb-ce91-dc2c-de3b-d8abfee7f950@gmail.com \
--to=serhe.popovych@gmail$(echo .)com \
--cc=dsahern@gmail$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=maze@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=stephen@networkplumber$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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