netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: stephane.chazelas@gmail.com, f.fainelli@gmail.com,
	davem@davemloft.net, Cong Wang <xiyou.wangcong@gmail.com>
Subject: [Patch net-next v2 0/3] net: forbid net devices named "all" "default" or "config"
Date: Fri, 25 Jul 2014 15:25:07 -0700	[thread overview]
Message-ID: <1406327110-17227-1-git-send-email-xiyou.wangcong@gmail.com> (raw)

/proc/sys/net/ipv[46]/conf/<dev> could conflict with
/proc/sys/net/ipv[46]/conf/(all|default). And /proc/net/vlan/<dev>
could conflict with /proc/net/vlan/config. Besides kernel warnings,
undefined behavior such as duplicated proc files also appears, therefore
we should forbid these names.

v2: introduce a helper function, suggested by Florian 
    fix error handling for ipv6_add_dev() in addrconf_init()


Cong Wang (3):
  ipv4: fail early when creating netdev named all or default
  ipv6: fail early when creating netdev named all or default
  vlan: fail early when creating netdev named config

 include/net/ip.h     |  6 ++++
 net/8021q/vlan.c     | 21 +++++++++-----
 net/8021q/vlanproc.c |  2 ++
 net/ipv4/devinet.c   | 36 +++++++++++++++++------
 net/ipv6/addrconf.c  | 82 ++++++++++++++++++++++++++++++++++------------------
 5 files changed, 102 insertions(+), 45 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2014-07-25 22:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 22:25 Cong Wang [this message]
2014-07-25 22:25 ` [Patch net-next v2 1/3] ipv4: fail early when creating netdev named all or default Cong Wang
2014-07-25 22:25 ` [Patch net-next v2 2/3] ipv6: " Cong Wang
2014-07-25 22:25 ` [Patch net-next v2 3/3] vlan: fail early when creating netdev named config Cong Wang
2014-07-29 18:44 ` [Patch net-next v2 0/3] net: forbid net devices named "all" "default" or "config" David Miller

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=1406327110-17227-1-git-send-email-xiyou.wangcong@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephane.chazelas@gmail.com \
    /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).