diff options
-rw-r--r-- | include/net/netfilter/nf_conntrack_helper.h | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_helper.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h index 66d65a7caa39..ee2a4b369a04 100644 --- a/include/net/netfilter/nf_conntrack_helper.h +++ b/include/net/netfilter/nf_conntrack_helper.h | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | struct module; | 15 | struct module; |
16 | 16 | ||
17 | #define NF_CT_HELPER_NAME_LEN 16 | ||
18 | |||
17 | struct nf_conntrack_helper | 19 | struct nf_conntrack_helper |
18 | { | 20 | { |
19 | struct hlist_node hnode; /* Internal use. */ | 21 | struct hlist_node hnode; /* Internal use. */ |
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index a51bdac9f3a0..805cfdd42303 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c | |||
@@ -142,6 +142,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me) | |||
142 | 142 | ||
143 | BUG_ON(me->expect_policy == NULL); | 143 | BUG_ON(me->expect_policy == NULL); |
144 | BUG_ON(me->expect_class_max >= NF_CT_MAX_EXPECT_CLASSES); | 144 | BUG_ON(me->expect_class_max >= NF_CT_MAX_EXPECT_CLASSES); |
145 | BUG_ON(strlen(me->name) > NF_CT_HELPER_NAME_LEN - 1); | ||
145 | 146 | ||
146 | mutex_lock(&nf_ct_helper_mutex); | 147 | mutex_lock(&nf_ct_helper_mutex); |
147 | hlist_add_head_rcu(&me->hnode, &nf_ct_helper_hash[h]); | 148 | hlist_add_head_rcu(&me->hnode, &nf_ct_helper_hash[h]); |