From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Cong Wang <cwang@twopensource.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: network interfaces called "all", "default" or "config"
Date: Fri, 15 Aug 2014 09:33:51 +0100 [thread overview]
Message-ID: <CACsCDONU9Zq902rj6aJXGZGnPfAWbxsiFe9mMS8usyyUdTYa9A@mail.gmail.com> (raw)
In-Reply-To: <CAHA+R7MLQtYF5vBN0D66Wk8iyGZABf5=Az293gUH6w=4THv8Gw@mail.gmail.com>
Yes, I know those are also used for the eth0:1 "aliases", but the bug
is, since it is allowed to do
ip link add link eth0 eth0:123 type vlan id 123
Then the
ip link del link eth0 eth0:123
should be allowed as well. Or probably better to avoid confusion
ip link add link eth0 foo:bar type vlan id 123
should not be allowed.
Worse:
ip link add link eth0 foo:bar type vlan id 1
ip link add link eth0 foo type vlan id 2
ip link del foo:bar
deletes foo instead of foo:bar.
On 14 August 2014 19:37, Cong Wang <cwang@twopensource.com> wrote:
> On Thu, Aug 14, 2014 at 2:41 AM, Stephane Chazelas
> <stephane.chazelas@gmail.com> wrote:
>> By the way, this is related:
>>
>> $ ip link add link eth0 eth0:123 type vlan id 123
>> $ ip link del link eth0 eth0:123
>> RTNETLINK answers: Operation not supported
>
> Kernel reads "eth0:123" as an alias of "eth0", so it will just
> truncate the dev name into "eth0":
>
>
> ifr.ifr_name[IFNAMSIZ-1] = 0;
>
> colon = strchr(ifr.ifr_name, ':');
> if (colon)
> *colon = 0;
next prev parent reply other threads:[~2014-08-15 8:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140723113314.GA7798@chaz.gmail.com>
2014-07-23 14:56 ` network interfaces called "all", "default" or "config" Randy Dunlap
2014-08-14 9:41 ` Stephane Chazelas
2014-08-14 18:28 ` Stephen Hemminger
2014-08-14 18:37 ` Cong Wang
2014-08-15 8:33 ` Stephane Chazelas [this message]
2014-08-15 17:32 ` Cong Wang
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=CACsCDONU9Zq902rj6aJXGZGnPfAWbxsiFe9mMS8usyyUdTYa9A@mail.gmail.com \
--to=stephane.chazelas@gmail.com \
--cc=cwang@twopensource.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rdunlap@infradead.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 NNTP newsgroup(s).