aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nf_defrag_ipv4.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-09-18 14:32:56 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2015-09-18 21:57:51 +0200
commit082a758f042e1c1eb241bfc2308ddc2b4ef6840d (patch)
tree47f20ac57ed1c46f3f0e7f6cb29195d94dcaf689 /net/ipv4/netfilter/nf_defrag_ipv4.c
parentinet netfilter: Remove hook from ip6t_do_table, arp_do_table, ipt_do_table (diff)
downloadlinux-dev-082a758f042e1c1eb241bfc2308ddc2b4ef6840d.tar.xz
linux-dev-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/ipv4/netfilter/nf_defrag_ipv4.c')
-rw-r--r--net/ipv4/netfilter/nf_defrag_ipv4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c
index 9306ec4fab41..8aea536d2e83 100644
--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -83,7 +83,7 @@ static unsigned int ipv4_conntrack_defrag(const struct nf_hook_ops *ops,
/* Gather fragments. */
if (ip_is_fragment(ip_hdr(skb))) {
enum ip_defrag_users user =
- nf_ct_defrag_user(ops->hooknum, skb);
+ nf_ct_defrag_user(state->hook, skb);
if (nf_ct_ipv4_gather_frags(skb, user))
return NF_STOLEN;