aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/reassembly.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r--net/ipv6/reassembly.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 6ad19cfc2025..0a1bf43bd489 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -233,16 +233,15 @@ out:
233/* Creation primitives. */ 233/* Creation primitives. */
234 234
235 235
236static struct frag_queue *ip6_frag_intern(struct frag_queue *fq_in) 236static struct frag_queue *ip6_frag_intern(struct frag_queue *fq_in,
237 unsigned int hash)
237{ 238{
238 struct frag_queue *fq; 239 struct frag_queue *fq;
239 unsigned int hash;
240#ifdef CONFIG_SMP 240#ifdef CONFIG_SMP
241 struct hlist_node *n; 241 struct hlist_node *n;
242#endif 242#endif
243 243
244 write_lock(&ip6_frags.lock); 244 write_lock(&ip6_frags.lock);
245 hash = ip6qhashfn(fq_in->id, &fq_in->saddr, &fq_in->daddr);
246#ifdef CONFIG_SMP 245#ifdef CONFIG_SMP
247 hlist_for_each_entry(fq, n, &ip6_frags.hash[hash], q.list) { 246 hlist_for_each_entry(fq, n, &ip6_frags.hash[hash], q.list) {
248 if (fq->id == fq_in->id && 247 if (fq->id == fq_in->id &&
@@ -273,7 +272,7 @@ static struct frag_queue *ip6_frag_intern(struct frag_queue *fq_in)
273 272
274static struct frag_queue * 273static struct frag_queue *
275ip6_frag_create(__be32 id, struct in6_addr *src, struct in6_addr *dst, 274ip6_frag_create(__be32 id, struct in6_addr *src, struct in6_addr *dst,
276 struct inet6_dev *idev) 275 struct inet6_dev *idev, unsigned int hash)
277{ 276{
278 struct frag_queue *fq; 277 struct frag_queue *fq;
279 278
@@ -290,7 +289,7 @@ ip6_frag_create(__be32 id, struct in6_addr *src, struct in6_addr *dst,
290 spin_lock_init(&fq->q.lock); 289 spin_lock_init(&fq->q.lock);
291 atomic_set(&fq->q.refcnt, 1); 290 atomic_set(&fq->q.refcnt, 1);
292 291
293 return ip6_frag_intern(fq); 292 return ip6_frag_intern(fq, hash);
294 293
295oom: 294oom:
296 IP6_INC_STATS_BH(idev, IPSTATS_MIB_REASMFAILS); 295 IP6_INC_STATS_BH(idev, IPSTATS_MIB_REASMFAILS);
@@ -318,7 +317,7 @@ fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst,
318 } 317 }
319 read_unlock(&ip6_frags.lock); 318 read_unlock(&ip6_frags.lock);
320 319
321 return ip6_frag_create(id, src, dst, idev); 320 return ip6_frag_create(id, src, dst, idev, hash);
322} 321}
323 322
324 323