inet: frag: move evictor calls into frag_find function
[deliverable/linux.git] / net / ipv6 / netfilter / nf_conntrack_reasm.c
index 767ab8da82189479456c632ecec95eef67da4bae..58e32cf91c9551041e9b46113216c3f0c5d4b4b0 100644 (file)
@@ -147,16 +147,13 @@ static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
 static unsigned int nf_hash_frag(__be32 id, const struct in6_addr *saddr,
                                 const struct in6_addr *daddr)
 {
-       u32 c;
-
        net_get_random_once(&nf_frags.rnd, sizeof(nf_frags.rnd));
-       c = jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
-                        (__force u32)id, nf_frags.rnd);
-       return c & (INETFRAGS_HASHSZ - 1);
+       return jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
+                           (__force u32)id, nf_frags.rnd);
 }
 
 
-static unsigned int nf_hashfn(struct inet_frag_queue *q)
+static unsigned int nf_hashfn(const struct inet_frag_queue *q)
 {
        const struct frag_queue *nq;
 
@@ -451,7 +448,7 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct net_device *dev)
        }
        sub_frag_mem_limit(&fq->q, head->truesize);
 
-       head->local_df = 1;
+       head->ignore_df = 1;
        head->next = NULL;
        head->dev = dev;
        head->tstamp = fq->q.stamp;
@@ -597,10 +594,6 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user)
        hdr = ipv6_hdr(clone);
        fhdr = (struct frag_hdr *)skb_transport_header(clone);
 
-       local_bh_disable();
-       inet_frag_evictor(&net->nf_frag.frags, &nf_frags, false);
-       local_bh_enable();
-
        fq = fq_find(net, fhdr->identification, user, &hdr->saddr, &hdr->daddr,
                     ip6_frag_ecn(hdr));
        if (fq == NULL) {
This page took 0.044652 seconds and 5 git commands to generate.