struct net_device *in;
        struct net_device *out;
        struct sock *sk;
+       struct net *net;
        struct list_head *hook_list;
        int (*okfn)(struct sock *, struct sk_buff *);
 };
                                      struct net_device *indev,
                                      struct net_device *outdev,
                                      struct sock *sk,
+                                     struct net *net,
                                      int (*okfn)(struct sock *, struct sk_buff *))
 {
        p->hook = hook;
        p->in = indev;
        p->out = outdev;
        p->sk = sk;
+       p->net = net;
        p->hook_list = hook_list;
        p->okfn = okfn;
 }
                struct nf_hook_state state;
 
                nf_hook_state_init(&state, hook_list, hook, thresh,
-                                  pf, indev, outdev, sk, okfn);
+                                  pf, indev, outdev, sk, net, okfn);
                return nf_hook_slow(skb, &state);
        }
        return 1;
 
 
        nf_hook_state_init(&state, &skb->dev->nf_hooks_ingress,
                           NF_NETDEV_INGRESS, INT_MIN, NFPROTO_NETDEV, NULL,
-                          skb->dev, NULL, NULL);
+                          skb->dev, NULL, dev_net(skb->dev), NULL);
        return nf_hook_slow(skb, &state);
 }