netfilter: Use nf_hook_state.net
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / netfilter / arptable_filter.c
index 93876d03120ca85fbc1e5aaa689d245d4508f01e..d217e4c196454e45e91eb1bf472614d3756961ca 100644 (file)
@@ -30,10 +30,8 @@ static unsigned int
 arptable_filter_hook(const struct nf_hook_ops *ops, struct sk_buff *skb,
                     const struct nf_hook_state *state)
 {
-       const struct net *net = dev_net(state->in ? state->in : state->out);
-
        return arpt_do_table(skb, ops->hooknum, state,
-                            net->ipv4.arptable_filter);
+                            state->net->ipv4.arptable_filter);
 }
 
 static struct nf_hook_ops *arpfilter_ops __read_mostly;