From: Stephen Hemminger <shemminger@vyatta.com>
To: Patrick McHardy <kaber@trash.net>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] vlan: allow creating vlan when real device is not up
Date: Thu, 30 Jul 2009 11:23:21 -0700 [thread overview]
Message-ID: <20090730112321.35753739@nehalam> (raw)
There is no reason for the arbitrary restriction that device must be
up to create a vlan. This patch was added to Vyatta kernel to resolve startup
ordering issues where vlan's are created but real device was disabled.
Note: the vlan already correctly inherits the operstate from real device; so
if vlan is created and real device is marked down, the vlan is marked
down.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/8021q/vlan.c 2009-07-30 11:15:34.983190412 -0700
+++ b/net/8021q/vlan.c 2009-07-30 11:16:03.590055942 -0700
@@ -225,12 +225,6 @@ int vlan_check_real_dev(struct net_devic
return -EOPNOTSUPP;
}
- /* The real device must be up and operating in order to
- * assosciate a VLAN device with it.
- */
- if (!(real_dev->flags & IFF_UP))
- return -ENETDOWN;
-
if (__find_vlan_dev(real_dev, vlan_id) != NULL)
return -EEXIST;
next reply other threads:[~2009-07-30 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 18:23 Stephen Hemminger [this message]
2009-07-30 20:17 ` [PATCH] vlan: allow creating vlan when real device is not up David Miller
2009-07-31 12:16 ` Patrick McHardy
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=20090730112321.35753739@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@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 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).