]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables-restore: warn about -t in rule lines
authorJan Engelhardt <jengelh@inai.de>
Sun, 17 Jun 2012 09:49:22 +0000 (11:49 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 31 Jul 2012 11:31:09 +0000 (13:31 +0200)
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>
iptables/ip6tables-restore.c
iptables/iptables-restore.c

index 1ec3dd958e8e5b39b9c4a2d64402ec67909fc760..294b242e685f15f969e4c1ea82dc62e5b654adab 100644 (file)
@@ -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);
                                        }
 
index 9f51f993fc1104564ec2d08ec77101f8d92ed351..f21754a488fd2d637574019d51aa57d8950c57e1 100644 (file)
@@ -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);
                                        }