From: Felix Bolte <bolte.felix@gmail.com>
Date: Tue, 21 Jul 2015 15:36:18 +0200
Subject: [PATCH 2/2] ip(6)tables-restore: remove old "-t" check
This check became obsolete as the follow up segfault has been fixed.
Furthermore the check was insufficient as "-vt" was still triggering an error.
We should let iptables decide whether the passed arguments are valid or not.
However, multiple "-t" arguments should not harm the outcome as the handle dictates the current table.
Signed-off-by: Felix Bolte <bolte.felix@gmail.com>
---
iptables/ip6tables-restore.c | 9 ---------
iptables/iptables-restore.c | 9 ---------
2 files changed, 18 deletions(-)
@@ -154,15 +154,6 @@ static void add_param_to_argv(char *parsestart)
param_buffer[param_len] = '\0';
- /* check if table name specified */
- if (!strncmp(param_buffer, "-t", 2)
- || !strncmp(param_buffer, "--table", 8)) {
- xtables_error(PARAMETER_PROBLEM,
- "The -t option (seen in line %u) cannot be "
- "used in ip6tables-restore.\n", line);
- exit(1);
- }
-
add_argv(param_buffer);
param_len = 0;
} else {
@@ -153,15 +153,6 @@ static void add_param_to_argv(char *parsestart)
param_buffer[param_len] = '\0';
- /* check if table name specified */
- if (!strncmp(param_buffer, "-t", 2)
- || !strncmp(param_buffer, "--table", 8)) {
- xtables_error(PARAMETER_PROBLEM,
- "The -t option (seen in line %u) cannot be "
- "used in iptables-restore.\n", line);
- exit(1);
- }
-
add_argv(param_buffer);
param_len = 0;
} else {
--
1.7.9.5