diff options
Diffstat (limited to 'iptables.c')
-rw-r--r-- | iptables.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1909,9 +1909,26 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle optind--; continue; } - if (!m) + if (!m) { + if (c == '?') { + if (optopt) { + exit_error( + PARAMETER_PROBLEM, + "option `%s' " + "requires an " + "argument", + argv[optind-1]); + } else { + exit_error( + PARAMETER_PROBLEM, + "unknown option " + "`%s'", + argv[optind-1]); + } + } exit_error(PARAMETER_PROBLEM, "Unknown arg `%s'", optarg); + } } } invert = FALSE; |