Skip to content

Commit

Permalink
vlan: allow creating vlan when real device is not up
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jul 30, 2009
1 parent 573dd78 commit b4076d1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,6 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id)
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;

Expand Down

0 comments on commit b4076d1

Please sign in to comment.