diff -NurpP --minimal linux-3.0.4-vs2.3.1-pre10.1/include/linux/netdevice.h linux-3.0.4-vs2.3.1-pre10.2/include/linux/netdevice.h --- linux-3.0.4-vs2.3.1-pre10.1/include/linux/netdevice.h 2011-08-08 23:04:47.000000000 +0200 +++ linux-3.0.4-vs2.3.1-pre10.2/include/linux/netdevice.h 2011-09-17 19:22:49.000000000 +0200 @@ -1650,6 +1650,7 @@ extern void netdev_resync_ops(struct ne extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); extern struct net_device *dev_get_by_index(struct net *net, int ifindex); extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); +extern struct net_device *dev_get_by_index_real_rcu(struct net *net, int ifindex); extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); extern int dev_restart(struct net_device *dev); #ifdef CONFIG_NETPOLL_TRAP diff -NurpP --minimal linux-3.0.4-vs2.3.1-pre10.1/net/core/dev.c linux-3.0.4-vs2.3.1-pre10.2/net/core/dev.c --- linux-3.0.4-vs2.3.1-pre10.1/net/core/dev.c 2011-06-15 02:40:14.000000000 +0200 +++ linux-3.0.4-vs2.3.1-pre10.2/net/core/dev.c 2011-09-17 19:20:44.000000000 +0200 @@ -708,19 +708,28 @@ EXPORT_SYMBOL(__dev_get_by_index); * about locking. The caller must hold RCU lock. */ -struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex) +struct net_device *dev_get_by_index_real_rcu(struct net *net, int ifindex) { struct hlist_node *p; struct net_device *dev; struct hlist_head *head = dev_index_hash(net, ifindex); hlist_for_each_entry_rcu(dev, p, head, index_hlist) - if ((dev->ifindex == ifindex) && - nx_dev_visible(current_nx_info(), dev)) + if (dev->ifindex == ifindex) return dev; return NULL; } +EXPORT_SYMBOL(dev_get_by_index_real_rcu); + +struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex) +{ + struct net_device *dev = dev_get_by_index_real_rcu(net, ifindex); + + if (nx_dev_visible(current_nx_info(), dev)) + return dev; + return NULL; +} EXPORT_SYMBOL(dev_get_by_index_rcu); diff -NurpP --minimal linux-3.0.4-vs2.3.1-pre10.1/net/ipv4/route.c linux-3.0.4-vs2.3.1-pre10.2/net/ipv4/route.c --- linux-3.0.4-vs2.3.1-pre10.1/net/ipv4/route.c 2011-08-29 03:45:10.000000000 +0200 +++ linux-3.0.4-vs2.3.1-pre10.2/net/ipv4/route.c 2011-09-17 19:23:37.000000000 +0200 @@ -2525,7 +2525,7 @@ static struct rtable *ip_route_output_sl if (fl4->flowi4_oif) { - dev_out = dev_get_by_index_rcu(net, fl4->flowi4_oif); + dev_out = dev_get_by_index_real_rcu(net, fl4->flowi4_oif); rth = ERR_PTR(-ENODEV); if (dev_out == NULL) goto out; diff -NurpP --minimal linux-3.0.4-vs2.3.1-pre10.1/net/ipv6/datagram.c linux-3.0.4-vs2.3.1-pre10.2/net/ipv6/datagram.c --- linux-3.0.4-vs2.3.1-pre10.1/net/ipv6/datagram.c 2011-05-22 16:18:00.000000000 +0200 +++ linux-3.0.4-vs2.3.1-pre10.2/net/ipv6/datagram.c 2011-09-17 19:24:15.000000000 +0200 @@ -639,7 +639,7 @@ int datagram_send_ctl(struct net *net, rcu_read_lock(); if (fl6->flowi6_oif) { - dev = dev_get_by_index_rcu(net, fl6->flowi6_oif); + dev = dev_get_by_index_real_rcu(net, fl6->flowi6_oif); if (!dev) { rcu_read_unlock(); return -ENODEV;