diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-12-24 17:03:41 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-12-24 17:03:41 +0100 |
commit | da2b8f936185e0224e0c4f78e724c45c7a52b194 (patch) | |
tree | 6e7499ab19e4de492edaac8705c2a2d736f40527 /include | |
parent | 7321f327c917d35eea319858d883d7d6430c514c (diff) |
src: export NFCT_HELPER_NAME_MAX
NFCT_HELPER_NAME_MAX is 16, which is the maximum helper name
allowed since 2.6.29.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/object.h | 10 | ||||
-rw-r--r-- | include/libnetfilter_conntrack/libnetfilter_conntrack.h | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/include/internal/object.h b/include/internal/object.h index 19d77b4..880f7c1 100644 --- a/include/internal/object.h +++ b/include/internal/object.h @@ -6,6 +6,8 @@ #ifndef _NFCT_OBJECT_H_ #define _NFCT_OBJECT_H_ +#include <libnetfilter_conntrack/libnetfilter_conntrack.h> + /* * nfct callback handler object */ @@ -161,11 +163,7 @@ struct nf_conntrack { u_int32_t id; u_int16_t zone; -/* xt_helper uses a length size of 30 bytes, however, no helper name in - * the tree has exceeded 16 bytes length. Since 2.6.29, the maximum - * length accepted is 16 bytes, this limit is enforced during module load. */ -#define __NFCT_HELPER_NAMELEN 16 - char helper_name[__NFCT_HELPER_NAMELEN]; + char helper_name[NFCT_HELPER_NAME_MAX]; /* According to Eric Paris <eparis@redhat.com> this field can be up to 4096 * bytes long. For that reason, we allocate this dynamically. */ char *secctx; @@ -269,7 +267,7 @@ struct nf_expect { u_int32_t id; u_int16_t zone; u_int32_t flags; - char helper_name[__NFCT_HELPER_NAMELEN]; + char helper_name[NFCT_HELPER_NAME_MAX]; u_int32_t set[1]; }; diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack.h b/include/libnetfilter_conntrack/libnetfilter_conntrack.h index 09e7920..f5add1a 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack.h @@ -716,6 +716,11 @@ enum ip_conntrack_status { #define NFCT_DIR_REPLY 1 #define NFCT_DIR_MAX NFCT_DIR_REPLY+1 +/* xt_helper uses a length size of 30 bytes, however, no helper name in + * the tree has exceeded 16 bytes length. Since 2.6.29, the maximum + * length accepted is 16 bytes, this limit is enforced during module load. */ +#define NFCT_HELPER_NAME_MAX 16 + #ifdef __cplusplus } #endif |