diff options
author | Eric W. Biederman | 2015-09-18 21:32:56 +0200 |
---|---|---|
committer | Pablo Neira Ayuso | 2015-09-18 21:57:51 +0200 |
commit | 082a758f042e1c1eb241bfc2308ddc2b4ef6840d (patch) | |
tree | 47f20ac57ed1c46f3f0e7f6cb29195d94dcaf689 /net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | |
parent | inet netfilter: Remove hook from ip6t_do_table, arp_do_table, ipt_do_table (diff) | |
download | kernel-qcow2-linux-082a758f042e1c1eb241bfc2308ddc2b4ef6840d.tar.gz kernel-qcow2-linux-082a758f042e1c1eb241bfc2308ddc2b4ef6840d.tar.xz kernel-qcow2-linux-082a758f042e1c1eb241bfc2308ddc2b4ef6840d.zip |
inet netfilter: Prefer state->hook to ops->hooknum
The values of nf_hook_state.hook and nf_hook_ops.hooknum must be the
same by definition.
We are more likely to access the fields in nf_hook_state over the
fields in nf_hook_ops so with a little luck this results in
fewer cache line misses, and slightly more consistent code.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/nf_defrag_ipv6_hooks.c')
-rw-r--r-- | net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c index 6b576be3c83e..a9c08520596b 100644 --- a/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c +++ b/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c @@ -63,7 +63,7 @@ static unsigned int ipv6_defrag(const struct nf_hook_ops *ops, return NF_ACCEPT; #endif - reasm = nf_ct_frag6_gather(skb, nf_ct6_defrag_user(ops->hooknum, skb)); + reasm = nf_ct_frag6_gather(skb, nf_ct6_defrag_user(state->hook, skb)); /* queued */ if (reasm == NULL) return NF_STOLEN; @@ -74,7 +74,7 @@ static unsigned int ipv6_defrag(const struct nf_hook_ops *ops, nf_ct_frag6_consume_orig(reasm); - NF_HOOK_THRESH(NFPROTO_IPV6, ops->hooknum, state->net, state->sk, reasm, + NF_HOOK_THRESH(NFPROTO_IPV6, state->hook, state->net, state->sk, reasm, state->in, state->out, state->okfn, NF_IP6_PRI_CONNTRACK_DEFRAG + 1); |