On Wed, Jul 12, 2017 at 10:08 AM, 张军伟(基础平台部)
<zhangjunweimar...@didichuxing.com> wrote:
> about skb->sk
> it is used as supplementary when skb->dev is empty,such as netlink message。
>
> +       if (skb->dev)
> +               net = dev_net(skb->dev);
> +       else if (skb->sk)
> +               net = sock_net(skb->sk);
> +       else
> +               return;

Check udp_set_dev_scratch().

Again, as Neil mentioned, the idea is arguable, it is actually harder to trace
skb's with your patch when they across netns'es.

Reply via email to