vlan: allow creating vlan when real device is not up
Subsystems (2)
PATCH 1/1 vlan: allow creating vlan when real device is not up
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.
net/8021q/vlan.c +0 -6
@@ -225,12 +225,6 @@ int vlan_check_real_dev(struct net_devicreturn -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 ;
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Thu, 30 Jul 2009 11:23:21 -0700
Quoted 9 lines
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 <[email protected]>
Looks fine, added to net-next-2.6
We can revert if Patrick or someone else finds a potential problem with allowing this.
Thanks.
Quoted 11 lines · David Miller
From: Stephen Hemminger <[email protected]>
Date: Thu, 30 Jul 2009 11:23:21 -0700Quoted 8 lines
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.
Quoted 6 lines
Quoted 1 line
Signed-off-by Stephen Hemminger <[email protected]>Looks fine, added to net-next-2.6
We can revert if Patrick or someone else finds a potential problem with allowing this.
It seems perfectly fine to me, we can get to the same state by setting the lower device down after creating the VLAN device.