Commit c559b9ff authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by Greg Kroah-Hartman

Revert "dev: set iflink to 0 for virtual interfaces"

[ Upstream commit 95ec655b ]

This reverts commit e1622baf.

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: default avatarOlivier Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bd60ae48
......@@ -672,10 +672,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment