From 2673fafaafd2fb72b2830fa07b172c2d4d5a553e Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 11 Oct 2018 13:30:38 +0200 Subject: xtables: Remove target_maxnamelen field This is a partial revert of commit 9f075031a1973 ("Combine parse_target() and command_jump() implementations"): Upstream prefers to reduce max chain name length of arptables by two characters instead of the introduced struct xtables_globals field which requires to bump library API version. Fixes: 9f075031a1973 ("Combine parse_target() and command_jump() implementations") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- iptables/xshared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'iptables/xshared.c') diff --git a/iptables/xshared.c b/iptables/xshared.c index d5365d93..b16f5fa6 100644 --- a/iptables/xshared.c +++ b/iptables/xshared.c @@ -641,10 +641,10 @@ const char *xt_parse_target(const char *targetname) xtables_error(PARAMETER_PROBLEM, "Invalid target name (too short)"); - if (strlen(targetname) >= xt_params->target_maxnamelen) + if (strlen(targetname) >= XT_EXTENSION_MAXNAMELEN) xtables_error(PARAMETER_PROBLEM, - "Invalid target name `%s' (%zu chars max)", - targetname, xt_params->target_maxnamelen - 1); + "Invalid target name `%s' (%u chars max)", + targetname, XT_EXTENSION_MAXNAMELEN - 1); for (ptr = targetname; *ptr; ptr++) if (isspace(*ptr)) -- cgit v1.2.3