net: Pass net into dst_output and remove dst_output_okfn
[linux-2.6-block.git] / net / ipv6 / output_core.c
index 928a0fb0b74406cdf32c89fe7db054b40476dc54..4337147ee23d9fcf8a3f4d2d98377bbce9f389fb 100644 (file)
@@ -140,6 +140,7 @@ EXPORT_SYMBOL(ip6_dst_hoplimit);
 
 static int __ip6_local_out_sk(struct sock *sk, struct sk_buff *skb)
 {
+       struct net *net = dev_net(skb_dst(skb)->dev);
        int len;
 
        len = skb->len - sizeof(struct ipv6hdr);
@@ -148,8 +149,9 @@ static int __ip6_local_out_sk(struct sock *sk, struct sk_buff *skb)
        ipv6_hdr(skb)->payload_len = htons(len);
        IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
 
-       return nf_hook(NFPROTO_IPV6, NF_INET_LOCAL_OUT, sk, skb,
-                      NULL, skb_dst(skb)->dev, dst_output_sk);
+       return nf_hook(NFPROTO_IPV6, NF_INET_LOCAL_OUT,
+                      net, sk, skb, NULL, skb_dst(skb)->dev,
+                      dst_output);
 }
 
 int __ip6_local_out(struct sk_buff *skb)
@@ -160,11 +162,12 @@ EXPORT_SYMBOL_GPL(__ip6_local_out);
 
 int ip6_local_out_sk(struct sock *sk, struct sk_buff *skb)
 {
+       struct net *net = dev_net(skb_dst(skb)->dev);
        int err;
 
        err = __ip6_local_out_sk(sk, skb);
        if (likely(err == 1))
-               err = dst_output_sk(sk, skb);
+               err = dst_output(net, sk, skb);
 
        return err;
 }