Skip to content

Commit

Permalink
netsched: Allow var_sk_bound_if meta to work on all namespaces
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 19, 2009
1 parent 3505d1a commit 2939e27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/sched/em_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ META_COLLECTOR(var_sk_bound_if)
struct net_device *dev;

rcu_read_lock();
dev = dev_get_by_index_rcu(&init_net, skb->sk->sk_bound_dev_if);
dev = dev_get_by_index_rcu(sock_net(skb->sk),
skb->sk->sk_bound_dev_if);
*err = var_dev(dev, dst);
rcu_read_unlock();
}
Expand Down

0 comments on commit 2939e27

Please sign in to comment.