diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-01-09 18:16:18 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-01-09 18:16:18 +0100 |
commit | ea5af85371bd18658ea2ffa0a6c9c48e2c64684b (patch) | |
tree | 0075f7951f4663a5e00a76f9bde84b6c920a3817 /src/main.c | |
parent | 6a2a56fcb81cf2e5ef46d37001810b82a56a42a5 (diff) |
main: restore --debug
Broken since options are mandatory before commands.
Fixes: fb9cea50e8b3 ("main: enforce options before commands")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -46,7 +46,7 @@ enum opt_vals { OPT_TERSE = 't', OPT_INVALID = '?', }; -#define OPTSTRING "+hvcf:iI:jvnsNaeSupypTt" +#define OPTSTRING "+hvd:cf:iI:jvnsNaeSupypTt" static const struct option options[] = { { @@ -228,8 +228,10 @@ static bool nft_options_check(int argc, char * const argv[]) if (nonoption) { nft_options_error(argc, argv, pos); return false; - } else if (argv[i][1] == 'I' || + } else if (argv[i][1] == 'd' || + argv[i][1] == 'I' || argv[i][1] == 'f' || + !strcmp(argv[i], "--debug") || !strcmp(argv[i], "--includepath") || !strcmp(argv[i], "--file")) { skip = true; |