inet: frag: remove periodic secret rebuild timer
[pandora-kernel.git] / net / ipv6 / netfilter / nf_conntrack_reasm.c
1 /*
2  * IPv6 fragment reassembly for connection tracking
3  *
4  * Copyright (C)2004 USAGI/WIDE Project
5  *
6  * Author:
7  *      Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
8  *
9  * Based on: net/ipv6/reassembly.c
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version
14  * 2 of the License, or (at your option) any later version.
15  */
16
17 #define pr_fmt(fmt) "IPv6-nf: " fmt
18
19 #include <linux/errno.h>
20 #include <linux/types.h>
21 #include <linux/string.h>
22 #include <linux/socket.h>
23 #include <linux/sockios.h>
24 #include <linux/jiffies.h>
25 #include <linux/net.h>
26 #include <linux/list.h>
27 #include <linux/netdevice.h>
28 #include <linux/in6.h>
29 #include <linux/ipv6.h>
30 #include <linux/icmpv6.h>
31 #include <linux/random.h>
32 #include <linux/slab.h>
33
34 #include <net/sock.h>
35 #include <net/snmp.h>
36 #include <net/inet_frag.h>
37
38 #include <net/ipv6.h>
39 #include <net/protocol.h>
40 #include <net/transp_v6.h>
41 #include <net/rawv6.h>
42 #include <net/ndisc.h>
43 #include <net/addrconf.h>
44 #include <net/inet_ecn.h>
45 #include <net/netfilter/ipv6/nf_conntrack_ipv6.h>
46 #include <linux/sysctl.h>
47 #include <linux/netfilter.h>
48 #include <linux/netfilter_ipv6.h>
49 #include <linux/kernel.h>
50 #include <linux/module.h>
51 #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
52
53
54 struct nf_ct_frag6_skb_cb
55 {
56         struct inet6_skb_parm   h;
57         int                     offset;
58         struct sk_buff          *orig;
59 };
60
61 #define NFCT_FRAG6_CB(skb)      ((struct nf_ct_frag6_skb_cb*)((skb)->cb))
62
63 static struct inet_frags nf_frags;
64
65 #ifdef CONFIG_SYSCTL
66 static struct ctl_table nf_ct_frag6_sysctl_table[] = {
67         {
68                 .procname       = "nf_conntrack_frag6_timeout",
69                 .data           = &init_net.nf_frag.frags.timeout,
70                 .maxlen         = sizeof(unsigned int),
71                 .mode           = 0644,
72                 .proc_handler   = proc_dointvec_jiffies,
73         },
74         {
75                 .procname       = "nf_conntrack_frag6_low_thresh",
76                 .data           = &init_net.nf_frag.frags.low_thresh,
77                 .maxlen         = sizeof(unsigned int),
78                 .mode           = 0644,
79                 .proc_handler   = proc_dointvec,
80         },
81         {
82                 .procname       = "nf_conntrack_frag6_high_thresh",
83                 .data           = &init_net.nf_frag.frags.high_thresh,
84                 .maxlen         = sizeof(unsigned int),
85                 .mode           = 0644,
86                 .proc_handler   = proc_dointvec,
87         },
88         { }
89 };
90
91 static int nf_ct_frag6_sysctl_register(struct net *net)
92 {
93         struct ctl_table *table;
94         struct ctl_table_header *hdr;
95
96         table = nf_ct_frag6_sysctl_table;
97         if (!net_eq(net, &init_net)) {
98                 table = kmemdup(table, sizeof(nf_ct_frag6_sysctl_table),
99                                 GFP_KERNEL);
100                 if (table == NULL)
101                         goto err_alloc;
102
103                 table[0].data = &net->nf_frag.frags.timeout;
104                 table[1].data = &net->nf_frag.frags.low_thresh;
105                 table[2].data = &net->nf_frag.frags.high_thresh;
106         }
107
108         hdr = register_net_sysctl(net, "net/netfilter", table);
109         if (hdr == NULL)
110                 goto err_reg;
111
112         net->nf_frag.sysctl.frags_hdr = hdr;
113         return 0;
114
115 err_reg:
116         if (!net_eq(net, &init_net))
117                 kfree(table);
118 err_alloc:
119         return -ENOMEM;
120 }
121
122 static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net)
123 {
124         struct ctl_table *table;
125
126         table = net->nf_frag.sysctl.frags_hdr->ctl_table_arg;
127         unregister_net_sysctl_table(net->nf_frag.sysctl.frags_hdr);
128         if (!net_eq(net, &init_net))
129                 kfree(table);
130 }
131
132 #else
133 static int nf_ct_frag6_sysctl_register(struct net *net)
134 {
135         return 0;
136 }
137 static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net)
138 {
139 }
140 #endif
141
142 static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h)
143 {
144         return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
145 }
146
147 static unsigned int nf_hash_frag(__be32 id, const struct in6_addr *saddr,
148                                  const struct in6_addr *daddr)
149 {
150         net_get_random_once(&nf_frags.rnd, sizeof(nf_frags.rnd));
151         return jhash_3words(ipv6_addr_hash(saddr), ipv6_addr_hash(daddr),
152                             (__force u32)id, nf_frags.rnd);
153 }
154
155
156 static unsigned int nf_hashfn(const struct inet_frag_queue *q)
157 {
158         const struct frag_queue *nq;
159
160         nq = container_of(q, struct frag_queue, q);
161         return nf_hash_frag(nq->id, &nq->saddr, &nq->daddr);
162 }
163
164 static void nf_skb_free(struct sk_buff *skb)
165 {
166         if (NFCT_FRAG6_CB(skb)->orig)
167                 kfree_skb(NFCT_FRAG6_CB(skb)->orig);
168 }
169
170 static void nf_ct_frag6_expire(unsigned long data)
171 {
172         struct frag_queue *fq;
173         struct net *net;
174
175         fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q);
176         net = container_of(fq->q.net, struct net, nf_frag.frags);
177
178         ip6_expire_frag_queue(net, fq, &nf_frags);
179 }
180
181 /* Creation primitives. */
182 static inline struct frag_queue *fq_find(struct net *net, __be32 id,
183                                          u32 user, struct in6_addr *src,
184                                          struct in6_addr *dst, u8 ecn)
185 {
186         struct inet_frag_queue *q;
187         struct ip6_create_arg arg;
188         unsigned int hash;
189
190         arg.id = id;
191         arg.user = user;
192         arg.src = src;
193         arg.dst = dst;
194         arg.ecn = ecn;
195
196         read_lock_bh(&nf_frags.lock);
197         hash = nf_hash_frag(id, src, dst);
198
199         q = inet_frag_find(&net->nf_frag.frags, &nf_frags, &arg, hash);
200         local_bh_enable();
201         if (IS_ERR_OR_NULL(q)) {
202                 inet_frag_maybe_warn_overflow(q, pr_fmt());
203                 return NULL;
204         }
205         return container_of(q, struct frag_queue, q);
206 }
207
208
209 static int nf_ct_frag6_queue(struct frag_queue *fq, struct sk_buff *skb,
210                              const struct frag_hdr *fhdr, int nhoff)
211 {
212         struct sk_buff *prev, *next;
213         unsigned int payload_len;
214         int offset, end;
215         u8 ecn;
216
217         if (fq->q.last_in & INET_FRAG_COMPLETE) {
218                 pr_debug("Already completed\n");
219                 goto err;
220         }
221
222         payload_len = ntohs(ipv6_hdr(skb)->payload_len);
223
224         offset = ntohs(fhdr->frag_off) & ~0x7;
225         end = offset + (payload_len -
226                         ((u8 *)(fhdr + 1) - (u8 *)(ipv6_hdr(skb) + 1)));
227
228         if ((unsigned int)end > IPV6_MAXPLEN) {
229                 pr_debug("offset is too large.\n");
230                 return -1;
231         }
232
233         ecn = ip6_frag_ecn(ipv6_hdr(skb));
234
235         if (skb->ip_summed == CHECKSUM_COMPLETE) {
236                 const unsigned char *nh = skb_network_header(skb);
237                 skb->csum = csum_sub(skb->csum,
238                                      csum_partial(nh, (u8 *)(fhdr + 1) - nh,
239                                                   0));
240         }
241
242         /* Is this the final fragment? */
243         if (!(fhdr->frag_off & htons(IP6_MF))) {
244                 /* If we already have some bits beyond end
245                  * or have different end, the segment is corrupted.
246                  */
247                 if (end < fq->q.len ||
248                     ((fq->q.last_in & INET_FRAG_LAST_IN) && end != fq->q.len)) {
249                         pr_debug("already received last fragment\n");
250                         goto err;
251                 }
252                 fq->q.last_in |= INET_FRAG_LAST_IN;
253                 fq->q.len = end;
254         } else {
255                 /* Check if the fragment is rounded to 8 bytes.
256                  * Required by the RFC.
257                  */
258                 if (end & 0x7) {
259                         /* RFC2460 says always send parameter problem in
260                          * this case. -DaveM
261                          */
262                         pr_debug("end of fragment not rounded to 8 bytes.\n");
263                         return -1;
264                 }
265                 if (end > fq->q.len) {
266                         /* Some bits beyond end -> corruption. */
267                         if (fq->q.last_in & INET_FRAG_LAST_IN) {
268                                 pr_debug("last packet already reached.\n");
269                                 goto err;
270                         }
271                         fq->q.len = end;
272                 }
273         }
274
275         if (end == offset)
276                 goto err;
277
278         /* Point into the IP datagram 'data' part. */
279         if (!pskb_pull(skb, (u8 *) (fhdr + 1) - skb->data)) {
280                 pr_debug("queue: message is too short.\n");
281                 goto err;
282         }
283         if (pskb_trim_rcsum(skb, end - offset)) {
284                 pr_debug("Can't trim\n");
285                 goto err;
286         }
287
288         /* Find out which fragments are in front and at the back of us
289          * in the chain of fragments so far.  We must know where to put
290          * this fragment, right?
291          */
292         prev = fq->q.fragments_tail;
293         if (!prev || NFCT_FRAG6_CB(prev)->offset < offset) {
294                 next = NULL;
295                 goto found;
296         }
297         prev = NULL;
298         for (next = fq->q.fragments; next != NULL; next = next->next) {
299                 if (NFCT_FRAG6_CB(next)->offset >= offset)
300                         break;  /* bingo! */
301                 prev = next;
302         }
303
304 found:
305         /* RFC5722, Section 4:
306          *                                  When reassembling an IPv6 datagram, if
307          *   one or more its constituent fragments is determined to be an
308          *   overlapping fragment, the entire datagram (and any constituent
309          *   fragments, including those not yet received) MUST be silently
310          *   discarded.
311          */
312
313         /* Check for overlap with preceding fragment. */
314         if (prev &&
315             (NFCT_FRAG6_CB(prev)->offset + prev->len) > offset)
316                 goto discard_fq;
317
318         /* Look for overlap with succeeding segment. */
319         if (next && NFCT_FRAG6_CB(next)->offset < end)
320                 goto discard_fq;
321
322         NFCT_FRAG6_CB(skb)->offset = offset;
323
324         /* Insert this fragment in the chain of fragments. */
325         skb->next = next;
326         if (!next)
327                 fq->q.fragments_tail = skb;
328         if (prev)
329                 prev->next = skb;
330         else
331                 fq->q.fragments = skb;
332
333         if (skb->dev) {
334                 fq->iif = skb->dev->ifindex;
335                 skb->dev = NULL;
336         }
337         fq->q.stamp = skb->tstamp;
338         fq->q.meat += skb->len;
339         fq->ecn |= ecn;
340         if (payload_len > fq->q.max_size)
341                 fq->q.max_size = payload_len;
342         add_frag_mem_limit(&fq->q, skb->truesize);
343
344         /* The first fragment.
345          * nhoffset is obtained from the first fragment, of course.
346          */
347         if (offset == 0) {
348                 fq->nhoffset = nhoff;
349                 fq->q.last_in |= INET_FRAG_FIRST_IN;
350         }
351
352         return 0;
353
354 discard_fq:
355         inet_frag_kill(&fq->q, &nf_frags);
356 err:
357         return -1;
358 }
359
360 /*
361  *      Check if this packet is complete.
362  *      Returns NULL on failure by any reason, and pointer
363  *      to current nexthdr field in reassembled frame.
364  *
365  *      It is called with locked fq, and caller must check that
366  *      queue is eligible for reassembly i.e. it is not COMPLETE,
367  *      the last and the first frames arrived and all the bits are here.
368  */
369 static struct sk_buff *
370 nf_ct_frag6_reasm(struct frag_queue *fq, struct net_device *dev)
371 {
372         struct sk_buff *fp, *op, *head = fq->q.fragments;
373         int    payload_len;
374         u8 ecn;
375
376         inet_frag_kill(&fq->q, &nf_frags);
377
378         WARN_ON(head == NULL);
379         WARN_ON(NFCT_FRAG6_CB(head)->offset != 0);
380
381         ecn = ip_frag_ecn_table[fq->ecn];
382         if (unlikely(ecn == 0xff))
383                 goto out_fail;
384
385         /* Unfragmented part is taken from the first segment. */
386         payload_len = ((head->data - skb_network_header(head)) -
387                        sizeof(struct ipv6hdr) + fq->q.len -
388                        sizeof(struct frag_hdr));
389         if (payload_len > IPV6_MAXPLEN) {
390                 pr_debug("payload len is too large.\n");
391                 goto out_oversize;
392         }
393
394         /* Head of list must not be cloned. */
395         if (skb_unclone(head, GFP_ATOMIC)) {
396                 pr_debug("skb is cloned but can't expand head");
397                 goto out_oom;
398         }
399
400         /* If the first fragment is fragmented itself, we split
401          * it to two chunks: the first with data and paged part
402          * and the second, holding only fragments. */
403         if (skb_has_frag_list(head)) {
404                 struct sk_buff *clone;
405                 int i, plen = 0;
406
407                 clone = alloc_skb(0, GFP_ATOMIC);
408                 if (clone == NULL)
409                         goto out_oom;
410
411                 clone->next = head->next;
412                 head->next = clone;
413                 skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list;
414                 skb_frag_list_init(head);
415                 for (i = 0; i < skb_shinfo(head)->nr_frags; i++)
416                         plen += skb_frag_size(&skb_shinfo(head)->frags[i]);
417                 clone->len = clone->data_len = head->data_len - plen;
418                 head->data_len -= clone->len;
419                 head->len -= clone->len;
420                 clone->csum = 0;
421                 clone->ip_summed = head->ip_summed;
422
423                 NFCT_FRAG6_CB(clone)->orig = NULL;
424                 add_frag_mem_limit(&fq->q, clone->truesize);
425         }
426
427         /* We have to remove fragment header from datagram and to relocate
428          * header in order to calculate ICV correctly. */
429         skb_network_header(head)[fq->nhoffset] = skb_transport_header(head)[0];
430         memmove(head->head + sizeof(struct frag_hdr), head->head,
431                 (head->data - head->head) - sizeof(struct frag_hdr));
432         head->mac_header += sizeof(struct frag_hdr);
433         head->network_header += sizeof(struct frag_hdr);
434
435         skb_shinfo(head)->frag_list = head->next;
436         skb_reset_transport_header(head);
437         skb_push(head, head->data - skb_network_header(head));
438
439         for (fp=head->next; fp; fp = fp->next) {
440                 head->data_len += fp->len;
441                 head->len += fp->len;
442                 if (head->ip_summed != fp->ip_summed)
443                         head->ip_summed = CHECKSUM_NONE;
444                 else if (head->ip_summed == CHECKSUM_COMPLETE)
445                         head->csum = csum_add(head->csum, fp->csum);
446                 head->truesize += fp->truesize;
447         }
448         sub_frag_mem_limit(&fq->q, head->truesize);
449
450         head->ignore_df = 1;
451         head->next = NULL;
452         head->dev = dev;
453         head->tstamp = fq->q.stamp;
454         ipv6_hdr(head)->payload_len = htons(payload_len);
455         ipv6_change_dsfield(ipv6_hdr(head), 0xff, ecn);
456         IP6CB(head)->frag_max_size = sizeof(struct ipv6hdr) + fq->q.max_size;
457
458         /* Yes, and fold redundant checksum back. 8) */
459         if (head->ip_summed == CHECKSUM_COMPLETE)
460                 head->csum = csum_partial(skb_network_header(head),
461                                           skb_network_header_len(head),
462                                           head->csum);
463
464         fq->q.fragments = NULL;
465         fq->q.fragments_tail = NULL;
466
467         /* all original skbs are linked into the NFCT_FRAG6_CB(head).orig */
468         fp = skb_shinfo(head)->frag_list;
469         if (fp && NFCT_FRAG6_CB(fp)->orig == NULL)
470                 /* at above code, head skb is divided into two skbs. */
471                 fp = fp->next;
472
473         op = NFCT_FRAG6_CB(head)->orig;
474         for (; fp; fp = fp->next) {
475                 struct sk_buff *orig = NFCT_FRAG6_CB(fp)->orig;
476
477                 op->next = orig;
478                 op = orig;
479                 NFCT_FRAG6_CB(fp)->orig = NULL;
480         }
481
482         return head;
483
484 out_oversize:
485         net_dbg_ratelimited("nf_ct_frag6_reasm: payload len = %d\n",
486                             payload_len);
487         goto out_fail;
488 out_oom:
489         net_dbg_ratelimited("nf_ct_frag6_reasm: no memory for reassembly\n");
490 out_fail:
491         return NULL;
492 }
493
494 /*
495  * find the header just before Fragment Header.
496  *
497  * if success return 0 and set ...
498  * (*prevhdrp): the value of "Next Header Field" in the header
499  *              just before Fragment Header.
500  * (*prevhoff): the offset of "Next Header Field" in the header
501  *              just before Fragment Header.
502  * (*fhoff)   : the offset of Fragment Header.
503  *
504  * Based on ipv6_skip_hdr() in net/ipv6/exthdr.c
505  *
506  */
507 static int
508 find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff)
509 {
510         u8 nexthdr = ipv6_hdr(skb)->nexthdr;
511         const int netoff = skb_network_offset(skb);
512         u8 prev_nhoff = netoff + offsetof(struct ipv6hdr, nexthdr);
513         int start = netoff + sizeof(struct ipv6hdr);
514         int len = skb->len - start;
515         u8 prevhdr = NEXTHDR_IPV6;
516
517         while (nexthdr != NEXTHDR_FRAGMENT) {
518                 struct ipv6_opt_hdr hdr;
519                 int hdrlen;
520
521                 if (!ipv6_ext_hdr(nexthdr)) {
522                         return -1;
523                 }
524                 if (nexthdr == NEXTHDR_NONE) {
525                         pr_debug("next header is none\n");
526                         return -1;
527                 }
528                 if (len < (int)sizeof(struct ipv6_opt_hdr)) {
529                         pr_debug("too short\n");
530                         return -1;
531                 }
532                 if (skb_copy_bits(skb, start, &hdr, sizeof(hdr)))
533                         BUG();
534                 if (nexthdr == NEXTHDR_AUTH)
535                         hdrlen = (hdr.hdrlen+2)<<2;
536                 else
537                         hdrlen = ipv6_optlen(&hdr);
538
539                 prevhdr = nexthdr;
540                 prev_nhoff = start;
541
542                 nexthdr = hdr.nexthdr;
543                 len -= hdrlen;
544                 start += hdrlen;
545         }
546
547         if (len < 0)
548                 return -1;
549
550         *prevhdrp = prevhdr;
551         *prevhoff = prev_nhoff;
552         *fhoff = start;
553
554         return 0;
555 }
556
557 struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user)
558 {
559         struct sk_buff *clone;
560         struct net_device *dev = skb->dev;
561         struct net *net = skb_dst(skb) ? dev_net(skb_dst(skb)->dev)
562                                        : dev_net(skb->dev);
563         struct frag_hdr *fhdr;
564         struct frag_queue *fq;
565         struct ipv6hdr *hdr;
566         int fhoff, nhoff;
567         u8 prevhdr;
568         struct sk_buff *ret_skb = NULL;
569
570         /* Jumbo payload inhibits frag. header */
571         if (ipv6_hdr(skb)->payload_len == 0) {
572                 pr_debug("payload len = 0\n");
573                 return skb;
574         }
575
576         if (find_prev_fhdr(skb, &prevhdr, &nhoff, &fhoff) < 0)
577                 return skb;
578
579         clone = skb_clone(skb, GFP_ATOMIC);
580         if (clone == NULL) {
581                 pr_debug("Can't clone skb\n");
582                 return skb;
583         }
584
585         NFCT_FRAG6_CB(clone)->orig = skb;
586
587         if (!pskb_may_pull(clone, fhoff + sizeof(*fhdr))) {
588                 pr_debug("message is too short.\n");
589                 goto ret_orig;
590         }
591
592         skb_set_transport_header(clone, fhoff);
593         hdr = ipv6_hdr(clone);
594         fhdr = (struct frag_hdr *)skb_transport_header(clone);
595
596         fq = fq_find(net, fhdr->identification, user, &hdr->saddr, &hdr->daddr,
597                      ip6_frag_ecn(hdr));
598         if (fq == NULL) {
599                 pr_debug("Can't find and can't create new queue\n");
600                 goto ret_orig;
601         }
602
603         spin_lock_bh(&fq->q.lock);
604
605         if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) {
606                 spin_unlock_bh(&fq->q.lock);
607                 pr_debug("Can't insert skb to queue\n");
608                 inet_frag_put(&fq->q, &nf_frags);
609                 goto ret_orig;
610         }
611
612         if (fq->q.last_in == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
613             fq->q.meat == fq->q.len) {
614                 ret_skb = nf_ct_frag6_reasm(fq, dev);
615                 if (ret_skb == NULL)
616                         pr_debug("Can't reassemble fragmented packets\n");
617         }
618         spin_unlock_bh(&fq->q.lock);
619
620         inet_frag_put(&fq->q, &nf_frags);
621         return ret_skb;
622
623 ret_orig:
624         kfree_skb(clone);
625         return skb;
626 }
627
628 void nf_ct_frag6_consume_orig(struct sk_buff *skb)
629 {
630         struct sk_buff *s, *s2;
631
632         for (s = NFCT_FRAG6_CB(skb)->orig; s;) {
633                 s2 = s->next;
634                 s->next = NULL;
635                 consume_skb(s);
636                 s = s2;
637         }
638 }
639
640 static int nf_ct_net_init(struct net *net)
641 {
642         net->nf_frag.frags.high_thresh = IPV6_FRAG_HIGH_THRESH;
643         net->nf_frag.frags.low_thresh = IPV6_FRAG_LOW_THRESH;
644         net->nf_frag.frags.timeout = IPV6_FRAG_TIMEOUT;
645         inet_frags_init_net(&net->nf_frag.frags);
646
647         return nf_ct_frag6_sysctl_register(net);
648 }
649
650 static void nf_ct_net_exit(struct net *net)
651 {
652         nf_ct_frags6_sysctl_unregister(net);
653         inet_frags_exit_net(&net->nf_frag.frags, &nf_frags);
654 }
655
656 static struct pernet_operations nf_ct_net_ops = {
657         .init = nf_ct_net_init,
658         .exit = nf_ct_net_exit,
659 };
660
661 int nf_ct_frag6_init(void)
662 {
663         int ret = 0;
664
665         nf_frags.hashfn = nf_hashfn;
666         nf_frags.constructor = ip6_frag_init;
667         nf_frags.destructor = NULL;
668         nf_frags.skb_free = nf_skb_free;
669         nf_frags.qsize = sizeof(struct frag_queue);
670         nf_frags.match = ip6_frag_match;
671         nf_frags.frag_expire = nf_ct_frag6_expire;
672         inet_frags_init(&nf_frags);
673
674         ret = register_pernet_subsys(&nf_ct_net_ops);
675         if (ret)
676                 inet_frags_fini(&nf_frags);
677
678         return ret;
679 }
680
681 void nf_ct_frag6_cleanup(void)
682 {
683         unregister_pernet_subsys(&nf_ct_net_ops);
684         inet_frags_fini(&nf_frags);
685 }