From d24c474fee4bab7cab2b119582bdf62fe60ab775 Mon Sep 17 00:00:00 2001 From: Eric Biederman Date: Fri, 13 Mar 2009 13:15:37 -0700 Subject: [PATCH] --- yaml --- r: 135176 b: refs/heads/master c: b0832a2961022a076c812384435b5f0290b3fc91 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/macvlan.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index ab8bc20c7be2..f1c1caf17d20 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7efb6ccc2113911e4e064f78bcd0343c4673038 +refs/heads/master: b0832a2961022a076c812384435b5f0290b3fc91 diff --git a/trunk/drivers/net/macvlan.c b/trunk/drivers/net/macvlan.c index 7e24b5048686..b5241fc0f512 100644 --- a/trunk/drivers/net/macvlan.c +++ b/trunk/drivers/net/macvlan.c @@ -461,12 +461,13 @@ static int macvlan_newlink(struct net_device *dev, if (lowerdev == NULL) return -ENODEV; - /* Don't allow macvlans on top of other macvlans - its not really - * wrong, but lockdep can't handle it and its not useful for anything - * you couldn't do directly on top of the real device. + /* When creating macvlans on top of other macvlans - use + * the real device as the lowerdev. */ - if (lowerdev->rtnl_link_ops == dev->rtnl_link_ops) - return -ENODEV; + if (lowerdev->rtnl_link_ops == dev->rtnl_link_ops) { + struct macvlan_dev *lowervlan = netdev_priv(lowerdev); + lowerdev = lowervlan->lowerdev; + } if (!tb[IFLA_MTU]) dev->mtu = lowerdev->mtu;