Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4076d17 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

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.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 573dd788
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -225,12 +225,6 @@ int vlan_check_real_dev(struct net_device *real_dev, u16 vlan_id)
		return -EOPNOTSUPP;
		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)
	if (__find_vlan_dev(real_dev, vlan_id) != NULL)
		return -EEXIST;
		return -EEXIST;