提交 2939e275 编写于 作者: E Eric Dumazet 提交者: David S. Miller

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: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3505d1a9
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册