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

Commit 18c22a03 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

vlan: allow to change type when no vlan device is hooked on netdev



vlan_info might be present but still no vlan devices might be there.
That is in case of vlan0 automatically added.

So in that case, allow to change netdev type.

Reported-by: default avatarJon Stanley <jstanley@rmrf.net>
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0ca7111a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -463,7 +463,9 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,

	case NETDEV_PRE_TYPE_CHANGE:
		/* Forbid underlaying device to change its type. */
		if (vlan_uses_dev(dev))
			return NOTIFY_BAD;
		break;

	case NETDEV_NOTIFY_PEERS:
	case NETDEV_BONDING_FAILOVER: