netfilter: Use nf_hook_state.net
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / netfilter / iptable_nat.c
index 0d4d9cdf98a4c0dcb2da3fbebe9264efeb99d4c7..4f4c64f81169ccea09f147834b5864d8ecdd08ee 100644 (file)
@@ -33,9 +33,8 @@ static unsigned int iptable_nat_do_chain(const struct nf_hook_ops *ops,
                                         const struct nf_hook_state *state,
                                         struct nf_conn *ct)
 {
-       struct net *net = nf_ct_net(ct);
-
-       return ipt_do_table(skb, ops->hooknum, state, net->ipv4.nat_table);
+       return ipt_do_table(skb, ops->hooknum, state,
+                           state->net->ipv4.nat_table);
 }
 
 static unsigned int iptable_nat_ipv4_fn(const struct nf_hook_ops *ops,