]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "dev: set iflink to 0 for virtual interfaces"
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 6 Jul 2015 15:25:10 +0000 (17:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2015 22:52:33 +0000 (15:52 -0700)
This reverts commit 9a1e9446d307dc125123f0b8a9f584207d470201.

The side effect of this commit is to add a '@NONE' after each virtual
interface name with a 'ip link'. It may break existing scripts.

Reported-by: Olivier Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 0ad6262143328f2a0bd6546a772703be9dab17bf..1e57efda055b58546876c2474f19719bb9e191cc 100644 (file)
@@ -677,10 +677,6 @@ int dev_get_iflink(const struct net_device *dev)
        if (dev->netdev_ops && dev->netdev_ops->ndo_get_iflink)
                return dev->netdev_ops->ndo_get_iflink(dev);
 
-       /* If dev->rtnl_link_ops is set, it's a virtual interface. */
-       if (dev->rtnl_link_ops)
-               return 0;
-
        return dev->ifindex;
 }
 EXPORT_SYMBOL(dev_get_iflink);