summaryrefslogtreecommitdiffstats
path: root/iptables.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables.c')
-rw-r--r--iptables.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iptables.c b/iptables.c
index 19f6d4fe..840dd3e5 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1876,10 +1876,10 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle
generic_opt_check(command, options);
- if (chain && strlen(chain) > IPT_FUNCTION_MAXNAMELEN)
+ if (chain != NULL && strlen(chain) >= XT_EXTENSION_MAXNAMELEN)
xtables_error(PARAMETER_PROBLEM,
- "chain name `%s' too long (must be under %i chars)",
- chain, IPT_FUNCTION_MAXNAMELEN);
+ "chain name `%s' too long (must be under %u chars)",
+ chain, XT_EXTENSION_MAXNAMELEN);
/* only allocate handle if we weren't called with a handle */
if (!*handle)