netfilter: x_tables: rectify XT_FUNCTION_MAXNAMELEN usage
authorJan Engelhardt <jengelh@medozas.de>
Tue, 27 Apr 2010 13:34:34 +0000 (15:34 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 27 Apr 2010 13:34:34 +0000 (15:34 +0200)
commit4b2cbd42bef5a22bb681acd607a7c3fbca1eeb3c
treeec3461cd593eaf65ffcd3fbb538c3976da1caa60
parentaf740b2c8f4521e2c45698ee6040941a82d6349d
netfilter: x_tables: rectify XT_FUNCTION_MAXNAMELEN usage

There has been quite a confusion in userspace about
XT_FUNCTION_MAXNAMELEN; because struct xt_entry_match used MAX-1,
userspace would have to do an awkward MAX-2 for maximum length
checking (due to '\0'). This patch adds a new define that matches the
definition of XT_TABLE_MAXNAMELEN - being the size of the actual
struct member, not one off.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
include/linux/netfilter/x_tables.h