]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: fail early when creating netdev named all or default
authorWANG Cong <xiyou.wangcong@gmail.com>
Fri, 25 Jul 2014 22:25:08 +0000 (15:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jul 2014 18:43:50 +0000 (11:43 -0700)
commit680708aba816bed0d3faa833c0fcee1e85be4dc0
tree19738d56563acf91956bb2a0b44de9ff2e1640cd
parent35504e2a23e92cc92e26c92c54c435b89b32f9d0
ipv4: fail early when creating netdev named all or default

We create a proc dir for each network device, this will cause
conflicts when the devices have name "all" or "default".

Rather than emitting an ugly kernel warning, we could just
fail earlier by checking the device name.

Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/devinet.c