linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* network interfaces called "all", "default" or "config"
@ 2014-07-23 11:33 Stephane Chazelas
  2014-07-23 14:56 ` Randy Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Stephane Chazelas @ 2014-07-23 11:33 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-15 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-23 11:33 network interfaces called "all", "default" or "config" Stephane Chazelas
2014-07-23 14:56 ` 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

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).