From 6a0448eecdee4c6a19303b75c1707915a80cbfbb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 31 Jan 2011 02:34:49 +0100 Subject: iptables: warn when parameter limit is exceeded While testing many match extensions in a single rule, I ran into this error not warned about. Arguments were just ignored, causing surprising "Need to specify an argument to --whatever" when the argument was in fact given on the command line. Signed-off-by: Jan Engelhardt --- ip6tables-restore.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ip6tables-restore.c') diff --git a/ip6tables-restore.c b/ip6tables-restore.c index cea5f36e..9948cd63 100644 --- a/ip6tables-restore.c +++ b/ip6tables-restore.c @@ -103,8 +103,11 @@ static int add_argv(char *what) { newargv[newargc] = strdup(what); newargc++; return 1; - } else + } else { + xtables_error(PARAMETER_PROBLEM, + "Parser cannot handle more arguments\n"); return 0; + } } static void free_argv(void) { -- cgit v1.2.3