summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2012-06-17 11:49:22 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2012-07-31 13:31:09 +0200
commitc5300d11308ccb429d551c32dffe752575c30b77 (patch)
tree3d7255b5b44bc63ba635a43d5f3720a317f26c69
parent42ba40035e40b492e8667932f20922cee0682167 (diff)
iptables-restore: warn about -t in rule lines
save-restore syntax uses *table, not -t table. Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--iptables/ip6tables-restore.c6
-rw-r--r--iptables/iptables-restore.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c
index 1ec3dd95..294b242e 100644
--- a/iptables/ip6tables-restore.c
+++ b/iptables/ip6tables-restore.c
@@ -416,8 +416,10 @@ int ip6tables_restore_main(int argc, char *argv[])
if (!strncmp(param_buffer, "-t", 2)
|| !strncmp(param_buffer, "--table", 8)) {
xtables_error(PARAMETER_PROBLEM,
- "Line %u seems to have a "
- "-t table option.\n", line);
+ "The -t option (seen in "
+ "line %u) cannot be used "
+ "in ip6tables-restore.\n",
+ line);
exit(1);
}
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 9f51f993..f21754a4 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -416,8 +416,10 @@ iptables_restore_main(int argc, char *argv[])
if (!strncmp(param_buffer, "-t", 2)
|| !strncmp(param_buffer, "--table", 8)) {
xtables_error(PARAMETER_PROBLEM,
- "Line %u seems to have a "
- "-t table option.\n", line);
+ "The -t option (seen in "
+ "line %u) cannot be used "
+ "in iptables-restore.\n",
+ line);
exit(1);
}