diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2006-04-11 18:22:37 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2006-04-11 18:22:37 +0000 |
commit | 1c162af7bc49f487a922edb926cede6c1ecef0ad (patch) | |
tree | e2f774a0a2918d46eb3cebc50989a03d58f7d0c7 | |
parent | cd51fbe7a3a7b7a79b1964c0a635e1bb0515fb47 (diff) | |
download | ebtables-1c162af7bc49f487a922edb926cede6c1ecef0ad.tar.gz ebtables-1c162af7bc49f487a922edb926cede6c1ecef0ad.tar.bz2 ebtables-1c162af7bc49f487a922edb926cede6c1ecef0ad.zip |
better error message with target problems
-rw-r--r-- | ebtables.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1073,8 +1073,14 @@ big_iface_length: if (w->parse(c - w->option_offset, argv, argc, new_entry, &w->flags, &w->w)) break; - if (w == NULL) - ebt_print_error2("Unknown argument: '%s', %c, '%c'", argv[optind - 1], (char)optopt, (char)c); + if (w == NULL && c == '?') + ebt_print_error2("Unknown argument: '%s'", argv[optind - 1], (char)optopt, (char)c); + else if (w == NULL) { + if (!strcmp(t->name, "standard")) + ebt_print_error2("Unknown argument: don't forget the -t option"); + else + ebt_print_error2("Target-specific option does not correspond with specified target"); + } if (ebt_errormsg[0] != '\0') return -1; if (w->used == 0) { |