aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/em_meta.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-11-19 02:24:41 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-19 02:24:41 -0500
commit2939e275994977b6c9eb7fd082b7b0caa35b96b0 (patch)
tree25bb3e0c2b38274b24fd7f808d78f8d083d9e02a /net/sched/em_meta.c
parent3505d1a9fd65e2d3e00827857b6795d9d8983658 (diff)
netsched: Allow var_sk_bound_if meta to work on all namespaces
This fix can probably wait 2.6.33, or should use another patch if needed in 2.6.32 (no get_dev_by_index_rcu() before 2.6.33) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r--net/sched/em_meta.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index 8e8d836f00c..24dce8b648a 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -310,7 +310,8 @@ META_COLLECTOR(var_sk_bound_if)
310 struct net_device *dev; 310 struct net_device *dev;
311 311
312 rcu_read_lock(); 312 rcu_read_lock();
313 dev = dev_get_by_index_rcu(&init_net, skb->sk->sk_bound_dev_if); 313 dev = dev_get_by_index_rcu(sock_net(skb->sk),
314 skb->sk->sk_bound_dev_if);
314 *err = var_dev(dev, dst); 315 *err = var_dev(dev, dst);
315 rcu_read_unlock(); 316 rcu_read_unlock();
316 } 317 }