mm: Remove slab destructors from kmem_cache_create().
[linux-2.6-block.git] / net / netfilter / nf_conntrack_core.c
index 5b194e3c4e254c0140b010033e9d60a150a78e7b..aa086c83af8000e0114cb46fc76fc6c4df4af717 100644 (file)
@@ -113,6 +113,36 @@ nf_ct_get_tuple(const struct sk_buff *skb,
 }
 EXPORT_SYMBOL_GPL(nf_ct_get_tuple);
 
+int nf_ct_get_tuplepr(const struct sk_buff *skb,
+                     unsigned int nhoff,
+                     u_int16_t l3num,
+                     struct nf_conntrack_tuple *tuple)
+{
+       struct nf_conntrack_l3proto *l3proto;
+       struct nf_conntrack_l4proto *l4proto;
+       unsigned int protoff;
+       u_int8_t protonum;
+       int ret;
+
+       rcu_read_lock();
+
+       l3proto = __nf_ct_l3proto_find(l3num);
+       ret = l3proto->get_l4proto(skb, nhoff, &protoff, &protonum);
+       if (ret != NF_ACCEPT) {
+               rcu_read_unlock();
+               return 0;
+       }
+
+       l4proto = __nf_ct_l4proto_find(l3num, protonum);
+
+       ret = nf_ct_get_tuple(skb, nhoff, protoff, l3num, protonum, tuple,
+                             l3proto, l4proto);
+
+       rcu_read_unlock();
+       return ret;
+}
+EXPORT_SYMBOL_GPL(nf_ct_get_tuplepr);
+
 int
 nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse,
                   const struct nf_conntrack_tuple *orig,
@@ -1078,7 +1108,7 @@ int __init nf_conntrack_init(void)
 
        nf_conntrack_cachep = kmem_cache_create("nf_conntrack",
                                                sizeof(struct nf_conn),
-                                               0, 0, NULL, NULL);
+                                               0, 0, NULL);
        if (!nf_conntrack_cachep) {
                printk(KERN_ERR "Unable to create nf_conn slab cache\n");
                goto err_free_hash;