All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: network interfaces called "all", "default" or "config"
Date: Wed, 23 Jul 2014 12:33:14 +0100	[thread overview]
Message-ID: <20140723113314.GA7798@chaz.gmail.com> (raw)

Hiya,

you may want to forbid the creation of interfaces whose name is
one of the special files in /proc/net and /proc/sys.

I can see some characters (like space, tab, newline, slash,
dot...) are alread forbidden in interface names (EINVAL), but
one can do for instance:

sudo ip link add link eth0 all type vlan id 2
sudo ip link add link eth0 default type vlan id 3
sudo ip link add link eth0 config type vlan id 4

Interestingly, after you add a "all" or "default", the
corresponding /proc/sys/net/ipv[46]/conf/(all|default) become
empty, and remain so even after you've removed the interface.

Adding an interface called "config" masks /proc/net/vlan/config

(tested with 3.14-1-amd64 on debian)

-- 
Stephane

             reply	other threads:[~2014-07-23 11:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 11:33 Stephane Chazelas [this message]
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
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=20140723113314.GA7798@chaz.gmail.com \
    --to=stephane.chazelas@gmail.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.