diff options
author | Holger Eitzenberger <holger@eitzenberger.org> | 2009-03-25 13:44:01 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-03-25 13:44:01 -0400 |
commit | af9d32ad6718b9a80fa89f557cc1fbb63a93ec15 (patch) | |
tree | fad7f7ccd2bc6fc8a04972f520dd8eedf257967e /net | |
parent | e487eb99cf9381a4f8254fa01747a85818da612b (diff) |
netfilter: limit the length of the helper name
This is necessary in order to have an upper bound for Netlink
message calculation, which is not a problem at all, as there
are no helpers with a longer name.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_helper.c | 1 |
1 files changed, 1 insertions, 0 deletions
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]); |