]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv6/netfilter/nf_conntrack_reasm.c
Merge remote-tracking branch 'arm-soc/for-next'
[karo-tx-linux.git] / net / ipv6 / netfilter / nf_conntrack_reasm.c
index 2fb86a99bf5f1325cb97e1bd75c5870b38f64116..d5efeb87350e7fc8643962036c0b26cfe471cdc4 100644 (file)
@@ -59,7 +59,7 @@ struct nf_ct_frag6_skb_cb
        struct sk_buff          *orig;
 };
 
-#define NFCT_FRAG6_CB(skb)     ((struct nf_ct_frag6_skb_cb*)((skb)->cb))
+#define NFCT_FRAG6_CB(skb)     ((struct nf_ct_frag6_skb_cb *)((skb)->cb))
 
 static struct inet_frags nf_frags;
 
@@ -445,7 +445,7 @@ nf_ct_frag6_reasm(struct frag_queue *fq, struct net_device *dev)
        skb_reset_transport_header(head);
        skb_push(head, head->data - skb_network_header(head));
 
-       for (fp=head->next; fp; fp = fp->next) {
+       for (fp = head->next; fp; fp = fp->next) {
                head->data_len += fp->len;
                head->len += fp->len;
                if (head->ip_summed != fp->ip_summed)
@@ -644,15 +644,22 @@ void nf_ct_frag6_consume_orig(struct sk_buff *skb)
                s = s2;
        }
 }
+EXPORT_SYMBOL_GPL(nf_ct_frag6_consume_orig);
 
 static int nf_ct_net_init(struct net *net)
 {
+       int res;
+
        net->nf_frag.frags.high_thresh = IPV6_FRAG_HIGH_THRESH;
        net->nf_frag.frags.low_thresh = IPV6_FRAG_LOW_THRESH;
        net->nf_frag.frags.timeout = IPV6_FRAG_TIMEOUT;
-       inet_frags_init_net(&net->nf_frag.frags);
-
-       return nf_ct_frag6_sysctl_register(net);
+       res = inet_frags_init_net(&net->nf_frag.frags);
+       if (res)
+               return res;
+       res = nf_ct_frag6_sysctl_register(net);
+       if (res)
+               inet_frags_uninit_net(&net->nf_frag.frags);
+       return res;
 }
 
 static void nf_ct_net_exit(struct net *net)