提交 95ec655b 编写于 作者: N Nicolas Dichtel 提交者: David S. Miller

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

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: NOlivier Hartkopp <socketcan@hartkopp.net>
Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: NOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d339727c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册