aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3be107e0bc93..26622d614f81 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -672,6 +672,10 @@ int dev_get_iflink(const struct net_device *dev)
672 if (dev->netdev_ops && dev->netdev_ops->ndo_get_iflink) 672 if (dev->netdev_ops && dev->netdev_ops->ndo_get_iflink)
673 return dev->netdev_ops->ndo_get_iflink(dev); 673 return dev->netdev_ops->ndo_get_iflink(dev);
674 674
675 /* If dev->rtnl_link_ops is set, it's a virtual interface. */
676 if (dev->rtnl_link_ops)
677 return 0;
678
675 return dev->ifindex; 679 return dev->ifindex;
676} 680}
677EXPORT_SYMBOL(dev_get_iflink); 681EXPORT_SYMBOL(dev_get_iflink);