diff options
author | Phil Sutter <phil@nwl.cc> | 2022-02-04 13:27:51 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2022-02-08 11:21:22 +0100 |
commit | 51d9d9e0813448025271d6948826990eb44b8dcc (patch) | |
tree | 9f05c466cd24a5beecc7aa52911cc7cd718bf286 /iptables/xtables-restore.c | |
parent | ad1ed75f203b614fe8f309df8b5021d5e391708a (diff) |
ebtables: Support verbose mode
Accept '-v' flag in both ebtables-nft and ebtables-nft-restore. Mostly
interesting because it allows for netlink debug output when specified
multiple times.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-restore.c')
-rw-r--r-- | iptables/xtables-restore.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c index f5aabf3c..81b25a43 100644 --- a/iptables/xtables-restore.c +++ b/iptables/xtables-restore.c @@ -417,6 +417,7 @@ static const struct nft_xt_restore_cb ebt_restore_cb = { static const struct option ebt_restore_options[] = { {.name = "noflush", .has_arg = 0, .val = 'n'}, + {.name = "verbose", .has_arg = 0, .val = 'v'}, { 0 } }; @@ -430,15 +431,18 @@ int xtables_eb_restore_main(int argc, char *argv[]) struct nft_handle h; int c; - while ((c = getopt_long(argc, argv, "n", + while ((c = getopt_long(argc, argv, "nv", ebt_restore_options, NULL)) != -1) { switch(c) { case 'n': noflush = 1; break; + case 'v': + verbose++; + break; default: fprintf(stderr, - "Usage: ebtables-restore [ --noflush ]\n"); + "Usage: ebtables-restore [ --verbose ] [ --noflush ]\n"); exit(1); break; } |