]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/nf_conntrack_helper.c
[MIPS] TXx9: Fix mips_hpt_frequency initialization
[linux-2.6-omap-h63xx.git] / net / netfilter / nf_conntrack_helper.c
index b1fd21cc1dbc2e613ea15e6813bb550bcc6ce7cb..8e0b4c8f62a8da1156d72c5e96b8c6f9e1c42e29 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
+#include <linux/rculist.h>
 
 #include <net/netfilter/nf_conntrack.h>
 #include <net/netfilter/nf_conntrack_l3proto.h>
@@ -110,7 +111,8 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me)
 {
        unsigned int h = helper_hash(&me->tuple);
 
-       BUG_ON(me->timeout == 0);
+       BUG_ON(me->expect_policy == NULL);
+       BUG_ON(me->expect_class_max >= NF_CT_MAX_EXPECT_CLASSES);
 
        mutex_lock(&nf_ct_helper_mutex);
        hlist_add_head_rcu(&me->hnode, &nf_ct_helper_hash[h]);
@@ -125,7 +127,7 @@ void nf_conntrack_helper_unregister(struct nf_conntrack_helper *me)
 {
        struct nf_conntrack_tuple_hash *h;
        struct nf_conntrack_expect *exp;
-       struct hlist_node *n, *next;
+       const struct hlist_node *n, *next;
        unsigned int i;
 
        mutex_lock(&nf_ct_helper_mutex);