lkml.org 
[lkml]   [2014]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectnetwork interfaces called "all", "default" or "config"
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


\
 
 \ /
  Last update: 2014-07-23 14:21    [W:0.830 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site