diff options
-rw-r--r-- | drivers/net/macvlan.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index acf93798dc67..cfb91570cddd 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -820,13 +820,11 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev, | |||
820 | if (lowerdev == NULL) | 820 | if (lowerdev == NULL) |
821 | return -ENODEV; | 821 | return -ENODEV; |
822 | 822 | ||
823 | /* When creating macvlans on top of other macvlans - use | 823 | /* When creating macvlans or macvtaps on top of other macvlans - use |
824 | * the real device as the lowerdev. | 824 | * the real device as the lowerdev. |
825 | */ | 825 | */ |
826 | if (lowerdev->rtnl_link_ops == dev->rtnl_link_ops) { | 826 | if (netif_is_macvlan(lowerdev)) |
827 | struct macvlan_dev *lowervlan = netdev_priv(lowerdev); | 827 | lowerdev = macvlan_dev_real_dev(lowerdev); |
828 | lowerdev = lowervlan->lowerdev; | ||
829 | } | ||
830 | 828 | ||
831 | if (!tb[IFLA_MTU]) | 829 | if (!tb[IFLA_MTU]) |
832 | dev->mtu = lowerdev->mtu; | 830 | dev->mtu = lowerdev->mtu; |