]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Chain name should not start with '!' (Yasuyuki Kozakai <yasuyuki.kozakai@toshiba...
authorYasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Mon, 13 Jun 2005 01:06:10 +0000 (01:06 +0000)
committerPatrick McHardy <kaber@trash.net>
Mon, 13 Jun 2005 01:06:10 +0000 (01:06 +0000)
ip6tables.c
iptables.c

index 11d8cd165713a27bd86f06b080bdfcf8b60c087f..fd38a2db89e32c97aa06b6e6a984e3a9dc8b81fa 100644 (file)
@@ -1822,10 +1822,10 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                        break;
 
                case 'N':
-                       if (optarg && *optarg == '-')
+                       if (optarg && (*optarg == '-' || *optarg == '!'))
                                exit_error(PARAMETER_PROBLEM,
                                           "chain name not allowed to start "
-                                          "with `-'\n");
+                                          "with `%c'\n", *optarg);
                        if (find_target(optarg, TRY_LOAD))
                                exit_error(PARAMETER_PROBLEM,
                                           "chain name may not clash "
index 33ee337e6a8172b498a9c9c7461d83003e2a002d..f8250cef917798c804eed9eb77cc98244994039b 100644 (file)
@@ -1925,10 +1925,10 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        break;
 
                case 'N':
-                       if (optarg && *optarg == '-')
+                       if (optarg && (*optarg == '-' || *optarg == '!'))
                                exit_error(PARAMETER_PROBLEM,
                                           "chain name not allowed to start "
-                                          "with `-'\n");
+                                          "with `%c'\n", *optarg);
                        if (find_target(optarg, TRY_LOAD))
                                exit_error(PARAMETER_PROBLEM,
                                           "chain name may not clash "