summaryrefslogtreecommitdiffstats
path: root/ip6tables-restore.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-06-07 11:50:25 +0200
committerJan Engelhardt <jengelh@medozas.de>2010-06-07 11:56:07 +0200
commit0cb675b8f18c4b074d4c69461638820708e98100 (patch)
tree25cf2323eb2d272755b098d29edbb7ef7ede4335 /ip6tables-restore.c
parent491c1660fced08e2d1a08c101c63af04250275d0 (diff)
xtables: another try at chain name length checking
Since XT_EXTENSION_MAXNAMELEN is now available, make use of it and clear the confusion. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'ip6tables-restore.c')
-rw-r--r--ip6tables-restore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ip6tables-restore.c b/ip6tables-restore.c
index f0725d1e..008566c4 100644
--- a/ip6tables-restore.c
+++ b/ip6tables-restore.c
@@ -253,11 +253,11 @@ int main(int argc, char *argv[])
exit(1);
}
- if (strlen(chain) > XT_FUNCTION_MAXNAMELEN - 1)
+ if (strlen(chain) >= XT_EXTENSION_MAXNAMELEN)
xtables_error(PARAMETER_PROBLEM,
"Invalid chain name `%s' "
"(%u chars max)",
- chain, XT_FUNCTION_MAXNAMELEN - 1);
+ chain, XT_EXTENSION_MAXNAMELEN - 1);
if (ip6tc_builtin(chain, handle) <= 0) {
if (noflush && ip6tc_is_chain(chain, handle)) {