ipv6: constify ip6_dst_lookup_{flow|tail}() sock arguments
[linux-2.6-block.git] / net / ipv6 / netfilter / ip6table_nat.c
index c3a7f7af0ed4d183d00a5f50307f44fa44399460..abea175d5853212421c4d8919f0de6794476534a 100644 (file)
@@ -30,42 +30,40 @@ static const struct xt_table nf_nat_ipv6_table = {
        .af             = NFPROTO_IPV6,
 };
 
-static unsigned int ip6table_nat_do_chain(const struct nf_hook_ops *ops,
+static unsigned int ip6table_nat_do_chain(void *priv,
                                          struct sk_buff *skb,
                                          const struct nf_hook_state *state,
                                          struct nf_conn *ct)
 {
-       struct net *net = nf_ct_net(ct);
-
-       return ip6t_do_table(skb, ops->hooknum, state, net->ipv6.ip6table_nat);
+       return ip6t_do_table(skb, state, state->net->ipv6.ip6table_nat);
 }
 
-static unsigned int ip6table_nat_fn(const struct nf_hook_ops *ops,
+static unsigned int ip6table_nat_fn(void *priv,
                                    struct sk_buff *skb,
                                    const struct nf_hook_state *state)
 {
-       return nf_nat_ipv6_fn(ops, skb, state, ip6table_nat_do_chain);
+       return nf_nat_ipv6_fn(priv, skb, state, ip6table_nat_do_chain);
 }
 
-static unsigned int ip6table_nat_in(const struct nf_hook_ops *ops,
+static unsigned int ip6table_nat_in(void *priv,
                                    struct sk_buff *skb,
                                    const struct nf_hook_state *state)
 {
-       return nf_nat_ipv6_in(ops, skb, state, ip6table_nat_do_chain);
+       return nf_nat_ipv6_in(priv, skb, state, ip6table_nat_do_chain);
 }
 
-static unsigned int ip6table_nat_out(const struct nf_hook_ops *ops,
+static unsigned int ip6table_nat_out(void *priv,
                                     struct sk_buff *skb,
                                     const struct nf_hook_state *state)
 {
-       return nf_nat_ipv6_out(ops, skb, state, ip6table_nat_do_chain);
+       return nf_nat_ipv6_out(priv, skb, state, ip6table_nat_do_chain);
 }
 
-static unsigned int ip6table_nat_local_fn(const struct nf_hook_ops *ops,
+static unsigned int ip6table_nat_local_fn(void *priv,
                                          struct sk_buff *skb,
                                          const struct nf_hook_state *state)
 {
-       return nf_nat_ipv6_local_fn(ops, skb, state, ip6table_nat_do_chain);
+       return nf_nat_ipv6_local_fn(priv, skb, state, ip6table_nat_do_chain);
 }
 
 static struct nf_hook_ops nf_nat_ipv6_ops[] __read_mostly = {