summaryrefslogtreecommitdiff
path: root/net/ipv6/netfilter
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-05-24 09:03:38 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-26 14:08:05 -0700
commita39aca678a0626941aa99c18c1c452ca758e7865 (patch)
treef7b16eb9d746b1afe0b8b70c78c5bc197aef0ca4 /net/ipv6/netfilter
parent9cce45f22ceedf639cbb5fb5dfe612a278d36b58 (diff)
net: add a net pointer to struct fqdir
fqdir will soon be dynamically allocated. We need to reach the struct net pointer from fqdir, so add it, and replace the various container_of() constructs by direct access to the new field. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/netfilter')
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index e72a1cc42163..b6f7385ed93c 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -143,12 +143,10 @@ static void nf_ct_frag6_expire(struct timer_list *t)
{
struct inet_frag_queue *frag = from_timer(frag, t, timer);
struct frag_queue *fq;
- struct net *net;
fq = container_of(frag, struct frag_queue, q);
- net = container_of(fq->q.fqdir, struct net, nf_frag.fqdir);
- ip6frag_expire_frag_queue(net, fq);
+ ip6frag_expire_frag_queue(fq->q.fqdir->net, fq);
}
/* Creation primitives. */
@@ -495,7 +493,7 @@ static int nf_ct_net_init(struct net *net)
net->nf_frag.fqdir.low_thresh = IPV6_FRAG_LOW_THRESH;
net->nf_frag.fqdir.timeout = IPV6_FRAG_TIMEOUT;
- res = fqdir_init(&net->nf_frag.fqdir, &nf_frags);
+ res = fqdir_init(&net->nf_frag.fqdir, &nf_frags, net);
if (res < 0)
return res;
res = nf_ct_frag6_sysctl_register(net);