]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
M.P.Anand Babu's fix for iptables rename chain without new chain bug.
authorM.P.Anand Babu <ab@fig.org>
Fri, 9 Jun 2000 09:22:38 +0000 (09:22 +0000)
committerJames Morris <jmorris@namei.org>
Fri, 9 Jun 2000 09:22:38 +0000 (09:22 +0000)
ip6tables.c
iptables.c

index b75b7d4cebaf5133353490e2fe75afc8238d2f9f..27e7187c6e0bc22fff26e18bcd9cb082c6bbb7a1 100644 (file)
@@ -1555,6 +1555,11 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                        if (optind < argc && argv[optind][0] != '-'
                            && argv[optind][0] != '!')
                                newname = argv[optind++];
+                       else
+                               exit_error(PARAMETER_PROBLEM,
+                                          "-%c requires old-chain-name and "
+                                          "new-chain-name",
+                                           cmd2char(CMD_RENAME_CHAIN));        
                        break;
 
                case 'P':
index 6c77d1338d82c0d15f5b7acd1fb22afa9b5e5e0f..bb5a1c5800774f9d85ecc9bb9f149cda5a5fa21d 100644 (file)
@@ -1623,6 +1623,11 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        if (optind < argc && argv[optind][0] != '-'
                            && argv[optind][0] != '!')
                                newname = argv[optind++];
+                       else
+                               exit_error(PARAMETER_PROBLEM,
+                                          "-%c requires old-chain-name and "
+                                          "new-chain-name",
+                                           cmd2char(CMD_RENAME_CHAIN));
                        break;
 
                case 'P':